Skip to content

Commit

Permalink
Merge pull request #14 from startersclan/fix/ci-fix-web-production-mi…
Browse files Browse the repository at this point in the history
…ssing-config-files-and-cmd

Fix (ci): Fix `web` production missing config files and `CMD`
  • Loading branch information
leojonathanoh committed Oct 30, 2023
2 parents f024078 + c95cb19 commit 7a022e5
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions Dockerfile.web
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ RUN set -eux; \
docker-php-ext-install sockets; \
apk del .deps

WORKDIR /web

FROM base AS dev

# Xdebug: https://stackoverflow.com/questions/46825502/how-do-i-install-xdebug-on-dockers-official-php-fpm-alpine-image
# PHPIZE_DEPS: autoconf dpkg-dev dpkg file g++ gcc libc-dev make pkgconf re2c
RUN apk add --no-cache --virtual .build-dependencies $PHPIZE_DEPS \
Expand Down Expand Up @@ -67,9 +63,18 @@ RUN set -eux; \
mv -v /usr/local/etc/php-fpm.d/www.conf /usr/local/etc/php-fpm.d/www.conf.disabled; \
mv -v /usr/local/etc/php-fpm.d/zz-docker.conf /usr/local/etc/php-fpm.d/zz-docker.conf.disabled;

WORKDIR /web

CMD ["/usr/bin/supervisord", "-c", "/supervisor.conf", "--pidfile", "/run/supervisord.pid"]

FROM base AS prod
FROM base AS dev

FROM dev AS prod

# Disable xdebug
RUN set -eux; \
rm /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini; \
php -m;

# Set permissions for 'www-data' user
# COPY --chown=www-data:www-data --chmod=640 /web /web
Expand Down

0 comments on commit 7a022e5

Please sign in to comment.