From 8d56f0763e776074dc6680876386071594c2a90e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sat, 24 Jun 2017 18:49:35 -0500 Subject: [PATCH] Use production.toml for reports when it exists in config --- docker-entrypoint.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index e6df2530..00101596 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -6,7 +6,13 @@ if [ ! -f "/app/config/production.toml" ] ; then cp /app/config/docker-production.toml.tmpl /app/config/production.toml fi if [ ! -f "/app/workers/reports/config/production.toml" ] ; then - echo "No production.toml for reports, copying from docker-production.toml.tmpl" - cp /app/config/docker-production.toml.tmpl /app/workers/reports/config/production.toml + echo "No production.toml for reports" + if [ -f "/app/config/production.toml" ] ; then + echo "copying config/production.toml to reports config directory" + cp /app/config/production.toml /app/workers/reports/config/production.toml + else + echo "copying config/docker-production.toml.tmpl to reports config directory as production.toml" + cp /app/config/docker-production.toml.tmpl /app/workers/reports/config/production.toml + fi fi exec "$@" \ No newline at end of file