Skip to content

Commit f2a2701

Browse files
turegjorupclaude
andcommitted
5402: Align nginx image env-var contract
Finalize the nginx image's operator-facing env-var surface so the compose side has a single name per concept: NGINX_FPM_SERVICE=os2display (host only — was host:port combined) NGINX_FPM_PORT=9000 (new — was embedded in NGINX_FPM_SERVICE) NGINX_PORT=8080 (unchanged) NGINX_MAX_BODY_SIZE=140m (was 10m) NGINX_SET_REAL_IP_FROM=172.16.0.0/12 (was 172.17.0.0/16) The /16 → /12 widening covers the full RFC1918 docker bridge range (172.16-172.31), so multi-network compose stacks no longer need to override the default. The 140m upload cap matches the planned PHP_POST_MAX_SIZE / NGINX_MAX_BODY_SIZE alignment for media uploads. The production template's upstream block now references ${NGINX_FPM_SERVICE}:${NGINX_FPM_PORT} explicitly. The dev compose stack uses its own template under .docker/templates/ and is unaffected by this change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c49aac4 commit f2a2701

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ All notable changes to this project will be documented in this file.
3737
- Added vitest for frontend unit tests.
3838
- Updated infrastructure and image build for mono-repo.
3939
- Fixed nginx static-file location to fall back to PHP so LiipImagineBundle can generate missing thumbnails (#370).
40+
- Aligned the nginx image env-var contract: split `NGINX_FPM_SERVICE` and
41+
`NGINX_FPM_PORT`, raised upload cap and trusted-proxy CIDR defaults.
4042

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

infrastructure/nginx/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ ARG GID=101
7171
ENV APP_CLIENT_PATH=/app \
7272
APP_API_PATH=/var/www/html \
7373
NGINX_PORT=8080 \
74-
NGINX_SET_REAL_IP_FROM=172.17.0.0/16 \
75-
NGINX_MAX_BODY_SIZE=10m
74+
NGINX_FPM_SERVICE=os2display \
75+
NGINX_FPM_PORT=9000 \
76+
NGINX_MAX_BODY_SIZE=140m \
77+
NGINX_SET_REAL_IP_FROM=172.16.0.0/12
7678

7779
WORKDIR ${APP_API_PATH}
7880

infrastructure/nginx/etc/templates/default.conf.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
upstream api_backend {
2-
server ${NGINX_FPM_SERVICE};
2+
server ${NGINX_FPM_SERVICE}:${NGINX_FPM_PORT};
33
keepalive 16;
44
}
55

0 commit comments

Comments
 (0)