Skip to content

Commit

Permalink
fix: add Drupal logs directory (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
esolitos authored Oct 10, 2023
1 parent ec0f071 commit a2df08a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
11 changes: 11 additions & 0 deletions templates/drupal-cron/default.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,14 @@ COPY --chown=1000:1000 ${COPY_FROM} ${COPY_TO}

# Copy the required crontab file
COPY ${COPY_FROM}/infrastructure/docker/drupal-cron/www-data.crontab /etc/crontabs/www-data

USER root

# Ensure the drupal logs directory exists and is owned by the webserver user.
ARG DRUPAL_LOGS_DIR=/var/www/html/logs
RUN set -e ;\
mkdir -p ${DRUPAL_LOGS_DIR} ;\
chown www-data:www-data ${DRUPAL_LOGS_DIR} ;\
chmod 775 ${DRUPAL_LOGS_DIR}

USER wodby
11 changes: 11 additions & 0 deletions templates/drupal-php/default.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,14 @@ FROM wodby/drupal-php:${BASE_TAG}
ARG COPY_FROM=.
ARG COPY_TO=.
COPY --chown=1000:1000 ${COPY_FROM} ${COPY_TO}

USER root

# Ensure the drupal logs directory exists and is owned by the webserver user.
ARG DRUPAL_LOGS_DIR=/var/www/html/logs
RUN set -e ;\
mkdir -p ${DRUPAL_LOGS_DIR} ;\
chown www-data:www-data ${DRUPAL_LOGS_DIR} ;\
chmod 775 ${DRUPAL_LOGS_DIR}

USER wodby
7 changes: 7 additions & 0 deletions templates/drupal-tailscale/default.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ COPY --chown=1000:1000 ${COPY_FROM} ${COPY_TO}

USER root

# Ensure the drupal logs directory exists and is owned by the webserver user.
ARG DRUPAL_LOGS_DIR=/var/www/html/logs
RUN set -e ;\
mkdir -p ${DRUPAL_LOGS_DIR} ;\
chown www-data:www-data ${DRUPAL_LOGS_DIR} ;\
chmod 775 ${DRUPAL_LOGS_DIR}

# Copy Tailscale binaries from the tailscale image on Docker Hub.
COPY --from=docker.io/tailscale/tailscale:stable /usr/local/bin/tailscaled /usr/local/bin/tailscaled
COPY --from=docker.io/tailscale/tailscale:stable /usr/local/bin/tailscale /usr/local/bin/tailscale
Expand Down

0 comments on commit a2df08a

Please sign in to comment.