Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Eliot <72140926+eliot488995568@users.noreply.github.com>
  • Loading branch information
ambroisemaupate and eliot488995568 authored Dec 5, 2024
1 parent 4e2e94e commit 1025a7e
Showing 1 changed file with 9 additions and 21 deletions.
30 changes: 9 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,15 @@ echo "nginx ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/nginx
install --verbose --owner nginx --group nginx --mode 0755 --directory /app
EOF

ENV NGINX_ENTRYPOINT_QUIET_LOGS=1
# Config
COPY --link docker/nginx/nginx.conf /etc/nginx/nginx.conf
COPY --link docker/nginx/redirections.conf /etc/nginx/redirections.conf
COPY --link docker/nginx/mime.types /etc/nginx/mime.types
COPY --link docker/nginx/conf.d/_gzip.conf /etc/nginx/conf.d/_gzip.conf
COPY --link docker/nginx/conf.d/_security.conf /etc/nginx/conf.d/_security.conf
COPY --link docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf

WORKDIR /app


Expand All @@ -211,15 +220,6 @@ WORKDIR /app
FROM nginx AS nginx-dev

# Silence entrypoint logs
ENV NGINX_ENTRYPOINT_QUIET_LOGS=1

# Config
COPY --link docker/nginx/nginx.conf /etc/nginx/nginx.conf
COPY --link docker/nginx/redirections.conf /etc/nginx/redirections.conf
COPY --link docker/nginx/mime.types /etc/nginx/mime.types
COPY --link docker/nginx/conf.d/_gzip.conf /etc/nginx/conf.d/_gzip.conf
COPY --link docker/nginx/conf.d/_security.conf /etc/nginx/conf.d/_security.conf
COPY --link docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf

# Declare a volume for development
VOLUME /app
Expand All @@ -231,18 +231,6 @@ VOLUME /app
##############

FROM nginx AS nginx-prod

# Silence entrypoint logs
ENV NGINX_ENTRYPOINT_QUIET_LOGS=1

# Config
COPY --link docker/nginx/nginx.conf /etc/nginx/nginx.conf
COPY --link docker/nginx/redirections.conf /etc/nginx/redirections.conf
COPY --link docker/nginx/mime.types /etc/nginx/mime.types
COPY --link docker/nginx/conf.d/_gzip.conf /etc/nginx/conf.d/_gzip.conf
COPY --link docker/nginx/conf.d/_security.conf /etc/nginx/conf.d/_security.conf
COPY --link docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf

# Copy public files from API
COPY --link --from=php-prod --chown=${USER_UID}:${USER_UID} /app/public /app/public

Expand Down

0 comments on commit 1025a7e

Please sign in to comment.