entrypoint.sh 1.1 KB

12345678910111213141516171819202122232425262728
  1. #!/bin/sh
  2. set -e
  3. # portal-server config
  4. portal_server_config=/apollo-portal-server/config/application-github.properties
  5. cp ${portal_server_config} ${portal_server_config}.cp
  6. sed -i -E "s#DATASOURCES_URL#${DATASOURCES_URL}#g" ${portal_server_config}.cp
  7. sed -i -E "s#DATASOURCES_USERNAME#${DATASOURCES_USERNAME}#g" ${portal_server_config}.cp
  8. sed -i -E "s#DATASOURCES_PASSWORD#${DATASOURCES_PASSWORD}#g" ${portal_server_config}.cp
  9. cat ${portal_server_config}.cp > ${portal_server_config}
  10. rm -rf ${portal_server_config}.cp
  11. # meta-server config
  12. meta_server_config=/apollo-portal-server/config/apollo-env.properties
  13. cp ${meta_server_config} ${meta_server_config}.cp
  14. sed -i -E "s#DEV_META_SERVICE_NAME#${DEV_META_SERVICE_NAME}#g" ${meta_server_config}.cp
  15. sed -i -E "s#TEST_ALPHA_META_SERVICE_NAME#${TEST_ALPHA_META_SERVICE_NAME}#g" ${meta_server_config}.cp
  16. sed -i -E "s#TEST_BETA_META_SERVICE_NAME#${TEST_BETA_META_SERVICE_NAME}#g" ${meta_server_config}.cp
  17. sed -i -E "s#PROD_META_SERVICE_NAME#${PROD_META_SERVICE_NAME}#g" ${meta_server_config}.cp
  18. cat ${meta_server_config}.cp > ${meta_server_config}
  19. rm -rf ${meta_server_config}.cp
  20. exec "$@"