Skip to content

Commit

Permalink
feat: move env variables to docker-cron-entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Scarbous committed Oct 29, 2024
1 parent afdb326 commit 131f702
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
8 changes: 0 additions & 8 deletions php/8.2.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,6 @@ FROM php-cli AS php-cron

WORKDIR /var/www

ENV VHOST_PATH="/var/www"
ENV CRONTAB_PATH=""
ENV CRON_USER=www-data

COPY --chmod=0755 cron/docker-cron-entrypoint /usr/local/bin/

ENTRYPOINT ["docker-cron-entrypoint"]
Expand Down Expand Up @@ -225,10 +221,6 @@ FROM php-cli-dev AS php-cron-dev

WORKDIR /var/www

ENV VHOST_PATH="/var/www"
ENV CRONTAB_PATH=""
ENV CRON_USER=www-data

COPY --chmod=0755 cron/docker-cron-entrypoint /usr/local/bin/

# Disabling the health check of the descendant php-fpm-dev image, since the production php-cron image does neither have a healthcheck.
Expand Down
8 changes: 0 additions & 8 deletions php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,6 @@ FROM php-cli AS php-cron

WORKDIR /var/www

ENV VHOST_PATH="/var/www"
ENV CRONTAB_PATH=""
ENV CRON_USER=www-data

COPY --chmod=0755 cron/docker-cron-entrypoint /usr/local/bin/

ENTRYPOINT ["docker-cron-entrypoint"]
Expand Down Expand Up @@ -221,10 +217,6 @@ FROM php-cli-dev AS php-cron-dev

WORKDIR /var/www

ENV VHOST_PATH="/var/www"
ENV CRONTAB_PATH=""
ENV CRON_USER=www-data

COPY --chmod=0755 cron/docker-cron-entrypoint /usr/local/bin/

# Disabling the health check of the descendant php-fpm-dev image, since the production php-cron image does neither have a healthcheck.
Expand Down
1 change: 1 addition & 0 deletions php/cron/docker-cron-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -e
env > /etc/environment

CRONTAB_PATH="${CRONTAB_PATH:-/var/www/Configuration/crontab}"
CRON_USER="${CRON_USER:-www-data}"

# init crontab file
if [ -f $CRONTAB_PATH ]; then
Expand Down

0 comments on commit 131f702

Please sign in to comment.