Replace Unit configuration with Nginx + PHP-FPM setup in Docker

- Remove outdated Unit-based Docker configuration and scripts.
- Introduce Nginx + PHP-FPM stack with environment-based configurations.
- Add custom Nginx setup for frontend-backend routing.
- Update Dockerfiles, Docker Compose, and related scripts for new architecture.
This commit is contained in:
2026-07-15 00:12:32 +05:00
parent 859187bafa
commit b35f04d220
15 changed files with 293 additions and 375 deletions
+27 -6
View File
@@ -1,30 +1,47 @@
#version: '3.7'
services:
web:
build:
context: app
dockerfile: docker/web/Dockerfile
target: DEVELOP
depends_on:
- app
ports:
- ${DOCKER_WEB_PORT}:80
environment:
IS_GZIP: 1
# FRONTEND_PORT: ${DOCKER_WEB_PORT}
BACKEND_HOST: app
BACKEND_PORT: 9000
TRUSTED_PROXY_CIDR: 172.16.0.0/12
volumes:
- ./app/application/public:/usr/share/nginx/html
- ./app/application/storage/app/public:/usr/share/nginx/html/storage
app:
build:
context: app
dockerfile: docker/Dockerfile
dockerfile: docker/php/Dockerfile
target: PRODUCTION
# restart: always
depends_on:
- db
- app-redis
- captcha-app
ports:
- ${DOCKER_APP_PORT}:9000
volumes:
- ./app/application:/var/www/html
environment:
CONTAINER_ROLE: app
UNIT_SOURCE: "172.16.0.0/12"
APP_ENV: production
queue:
build:
context: app
dockerfile: docker/Dockerfile
dockerfile: docker/php/Dockerfile
target: PRODUCTION
# restart: always
depends_on:
- app
- db
- app-redis
environment:
@@ -35,10 +52,11 @@ services:
scheduler:
build:
context: app
dockerfile: docker/Dockerfile
dockerfile: docker/php/Dockerfile
target: PRODUCTION
# restart: always
depends_on:
- app
- db
- app-redis
environment:
@@ -75,6 +93,7 @@ services:
image: korelf/service-captcha:0.8.2
# restart: always
depends_on:
- captcha-app
- db
- captcha-redis
environment:
@@ -84,6 +103,7 @@ services:
image: korelf/service-captcha:0.8.2
# restart: always
depends_on:
- captcha-app
- db
- captcha-redis
environment:
@@ -95,6 +115,7 @@ services:
image: korelf/service-captcha:0.8.2
# restart: always
depends_on:
- captcha-app
- db
- captcha-redis
environment: