Consolidate PHP and Nginx Dockerfiles

- Merge separate PHP and Nginx Dockerfiles into a unified structure under `app/docker/Dockerfile`.
- Simplify build stages and streamline multi-service configuration for production, development, and utility containers.
- Remove outdated individual Dockerfiles (`php/Dockerfile` and `web/Dockerfile`).
This commit is contained in:
2026-07-26 02:19:29 +05:00
parent 136451dc5a
commit 059d2b9d66
2 changed files with 43 additions and 46 deletions
-31
View File
@@ -1,31 +0,0 @@
FROM docker.io/nginx:1.31-alpine AS build
COPY docker/web/conf/default.conf.template /etc/nginx/templates/default.conf.template
COPY docker/web/conf/fastcgi_params /etc/nginx/fastcgi_params
COPY docker/web/start.sh /usr/local/bin/start
RUN chmod 755 /usr/local/bin/start
FROM build AS app_build_for_production
WORKDIR /home/app
COPY application /home/app
RUN apk --no-cache add git nodejs npm \
&& npm install && npm run build \
&& rm -rf /home/app/node_modules
FROM build AS production
COPY --from=app_build_for_production /home/app/public /usr/share/nginx/html
WORKDIR /usr/share/nginx/html
EXPOSE 80
CMD ["/usr/local/bin/start"]
FROM build AS develop
WORKDIR /usr/share/nginx/html
EXPOSE 80
CMD ["/usr/local/bin/start"]