File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# ###############################
2- # Assets build
2+ # Assets build
33# ###############################
44FROM --platform=$BUILDPLATFORM node:24-alpine AS assets_builder
55LABEL maintainer="ITK Dev <itkdev@mkb.aarhus.dk>"
@@ -45,7 +45,7 @@ RUN rm -rf package* vite.config.js
4545
4646
4747# ###############################
48- # PHP-FPM (API) production image
48+ # PHP-FPM (API) production image
4949# ###############################
5050FROM --platform=$BUILDPLATFORM itkdev/php8.4-fpm:alpine
5151LABEL maintainer="ITK Dev <itkdev@mkb.aarhus.dk>"
@@ -65,6 +65,9 @@ ENV APP_ENV=prod \
6565
6666# Install the api application.
6767COPY --chown=deploy:deploy --from=api_app_builder /app .
68- RUN mkdir -p ./config/secrets
68+
69+ # Symfony settings (warmup required to make vite assets work corretly)
70+ RUN mkdir -p ./config/secrets \
71+ bin/console cache:warmup
6972
7073CMD [ "docker-entrypoint.sh" ]
Original file line number Diff line number Diff line change 1- upstream api_backend {
2- server ${NGINX_FPM_SERVICE};
3- keepalive 16;
4- }
5-
61server {
72 listen ${NGINX_PORT};
83 listen [::]:${NGINX_PORT};
@@ -27,7 +22,7 @@ server {
2722 add_header Referrer-Policy "strict-origin-when-cross-origin" always;
2823
2924 # Real IP from reverse proxy
30- set_real_ip_from ${NGINX_SET_REAL_IP_FROM};
25+ set_real_ip_from ${NGINX_SET_REAL_IP_FROM:-172.16.0.0/16 };
3126 real_ip_recursive on;
3227 real_ip_header X-Forwarded-For;
3328
@@ -63,7 +58,7 @@ server {
6358
6459 # Screen client online check should just serve static files
6560 location /client/online-check {
66- index index.html index.htm ;
61+ index index.html;
6762 }
6863
6964 location = /robots.txt {
@@ -98,7 +93,7 @@ server {
9893
9994 # PHP-FPM handling
10095 location ~ ^/index\.php(/|$) {
101- fastcgi_pass api_backend ;
96+ fastcgi_pass ${NGINX_FPM_SERVICE}:${NGINX_FPM_PORT} ;
10297 fastcgi_split_path_info ^(.+\.php)(/.*)$;
10398 include fastcgi_params;
10499
@@ -126,7 +121,6 @@ server {
126121 return 404;
127122 }
128123
129- # Send log message to files symlinked to stdout/stderr.
130124 sendfile on;
131125 keepalive_timeout 65;
132126
You can’t perform that action at this time.
0 commit comments