Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ All notable changes to this project will be documented in this file.
- Annotated `.env` so it serves as the canonical, self-documenting Symfony
env example, with a CI check that enforces it stays in sync with `config/`.
- Switched image build pipeline to GHCR with multi-arch layer caching.
- Aligned the nginx image env-var contract: split `NGINX_FPM_SERVICE` and
`NGINX_FPM_PORT`, raised upload cap and trusted-proxy CIDR defaults.

### NB! Prior to 3.x the project was split into separate repositories

Expand Down
3 changes: 2 additions & 1 deletion docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ services:
networks:
- app
depends_on:
- nginx
nginx:
condition: service_healthy
volumes:
- .:/app
- /tmp/.X11-unix:/tmp/.X11-unix
Expand Down
16 changes: 15 additions & 1 deletion docker-compose.server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,25 @@ services:
- ./infrastructure/nginx/etc/nginx.conf:/etc/nginx/nginx.conf:ro
- .:/app
environment:
NGINX_FPM_SERVICE: ${COMPOSE_PROJECT_NAME}-phpfpm-1:9000
NGINX_FPM_SERVICE: ${COMPOSE_PROJECT_NAME}-phpfpm-1
NGINX_FPM_PORT: 9000
NGINX_WEB_ROOT: /app/public
NGINX_PORT: 8080
NGINX_MAX_BODY_SIZE: 5M
NGINX_SET_REAL_IP_FROM: 172.16.0.0/12
healthcheck:
# $$NGINX_PORT escapes compose-time interpolation; the variable is
# expanded by the shell inside the container against the service's
# environment.
test:
[
"CMD-SHELL",
'wget --quiet --tries=1 --spider "http://localhost:$$NGINX_PORT/health"',
]
interval: 5s
timeout: 3s
retries: 6
start_period: 5s
labels:
- "traefik.enable=true"
- "traefik.docker.network=frontend"
Expand Down
16 changes: 15 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,25 @@ services:
- ./infrastructure/nginx/etc/nginx.conf:/etc/nginx/nginx.conf:ro
- .:/app
environment:
NGINX_FPM_SERVICE: ${COMPOSE_PROJECT_NAME}-phpfpm-1:9000
NGINX_FPM_SERVICE: ${COMPOSE_PROJECT_NAME}-phpfpm-1
NGINX_FPM_PORT: 9000
NGINX_WEB_ROOT: /app/public
NGINX_PORT: 8080
NGINX_MAX_BODY_SIZE: 5M
NGINX_SET_REAL_IP_FROM: 172.16.0.0/12
healthcheck:
# $$NGINX_PORT escapes compose-time interpolation; the variable is
# expanded by the shell inside the container against the service's
# environment.
test:
[
"CMD-SHELL",
'wget --quiet --tries=1 --spider "http://localhost:$$NGINX_PORT/health"',
]
interval: 5s
timeout: 3s
retries: 6
start_period: 5s
labels:
- "traefik.enable=true"
- "traefik.docker.network=frontend"
Expand Down
6 changes: 4 additions & 2 deletions infrastructure/nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ ARG GID=101
ENV APP_CLIENT_PATH=/app \
APP_API_PATH=/var/www/html \
NGINX_PORT=8080 \
NGINX_SET_REAL_IP_FROM=172.17.0.0/16 \
NGINX_MAX_BODY_SIZE=10m \
NGINX_FPM_SERVICE=os2display \
NGINX_FPM_PORT=9000 \
NGINX_MAX_BODY_SIZE=140m \
NGINX_SET_REAL_IP_FROM=172.16.0.0/12 \
NGINX_WEB_ROOT=/var/www/html/public

WORKDIR ${APP_API_PATH}
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/nginx/etc/templates/default.conf.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
upstream api_backend {
server ${NGINX_FPM_SERVICE};
server ${NGINX_FPM_SERVICE}:${NGINX_FPM_PORT};
keepalive 16;
}

Expand Down