diff --git a/.dockerignore b/.dockerignore index 5f51686..5cabdc7 100755 --- a/.dockerignore +++ b/.dockerignore @@ -7,8 +7,7 @@ __pycache__ *.pyc *.md *.txt -.env -.env.* +.env.example !robots.txt *.xml !sitemap.xml diff --git a/Dockerfile b/Dockerfile index 614eb7b..ed6c80e 100755 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,7 @@ COPY robots.txt /var/www/html/robots.txt COPY sitemap.xml /var/www/html/sitemap.xml COPY 404.html /var/www/html/404.html COPY 500.html /var/www/html/500.html +COPY .env /var/www/html/.env RUN chown -R www-data:www-data /var/www/html diff --git a/infra/entrypoint.sh b/infra/entrypoint.sh index e24ab27..b20732c 100755 --- a/infra/entrypoint.sh +++ b/infra/entrypoint.sh @@ -1,5 +1,8 @@ #!/bin/sh set -e +if [ -f /var/www/html/.env ]; then + set -a; . /var/www/html/.env; set +a +fi if [ -z "$ALTCHA_HMAC_KEY" ]; then export ALTCHA_HMAC_KEY="$(openssl rand -hex 32)" echo "Generated ALTCHA_HMAC_KEY" >&2