Skip to content

Commit 17ab71d

Browse files
committed
5282: Updated docker compose setup
1 parent eefacb5 commit 17ab71d

File tree

7 files changed

+34
-11
lines changed

7 files changed

+34
-11
lines changed

.docker/nginx.conf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ events {
77
worker_connections 1024;
88
}
99

10-
1110
http {
1211
proxy_temp_path /tmp/proxy_temp;
1312
client_body_temp_path /tmp/client_temp;
@@ -18,7 +17,7 @@ http {
1817
include /etc/nginx/mime.types;
1918
default_type application/octet-stream;
2019

21-
set_real_ip_from 172.16.0.0/8;
20+
set_real_ip_from 172.16.0.0/16;
2221
real_ip_recursive on;
2322
real_ip_header X-Forwarded-For;
2423

.docker/templates/default.conf.template

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ server {
44

55
root ${NGINX_WEB_ROOT};
66

7-
___location / {
8-
# We are co-hosting with the legacy EventDB, so this app is hosted under '/api/v2/' (.env::APP_PATH_PREFIX)
9-
# This is configured for Symfony in both 'api_platform.prefix' and 'framework.assets.base_path'. However
10-
# Symfony still installs assets in the root path so we need to rewrite the uri to remove '/api/v2/'.
11-
rewrite ^${APP_PATH_PREFIX}/(.*) /$1 break;
7+
client_max_body_size ${NGINX_MAX_BODY_SIZE};
8+
9+
# This also needs to be set in the single server tag and not only in http.
10+
set_real_ip_from 172.16.0.0/16;
11+
real_ip_recursive on;
12+
real_ip_header X-Forwarded-For;
1213

14+
___location / {
1315
# try to serve file directly, fallback to index.php
1416
try_files $uri /index.php$is_args$args;
1517
}

docker-compose.dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# itk-version: 3.2.3
1+
# itk-version: 3.2.4
22
services:
33
phpfpm:
44
environment:

docker-compose.override.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ services:
2222
environment:
2323
APP_PATH_PREFIX: ${APP_PATH_PREFIX}
2424
labels:
25+
# HTTPS config - uncomment to enable redirect from :80 to :443
26+
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=redirect-to-https"
27+
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
2528
# Scope hosting by path prefix to allow shared hosting with legacy EventDB
2629
# 'https://api.detskeriaarhus.dk/api/' -> Legacy EventDB
2730
# 'https://api.detskeriaarhus.dk/api/v2/' -> EventDB v2

docker-compose.redirect.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# itk-version: 3.2.3
1+
# itk-version: 3.2.4
22
services:
33
nginx:
44
labels:

docker-compose.server.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# itk-version: 3.2.3
1+
# itk-version: 3.2.4
22
networks:
33
frontend:
44
external: true

docker-compose.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# itk-version: 3.2.3
1+
# itk-version: 3.2.4
22
networks:
33
frontend:
44
external: true
@@ -85,3 +85,22 @@ services:
8585
- "traefik.docker.network=frontend"
8686
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}mail.rule=Host(`mail-${COMPOSE_DOMAIN}`)"
8787
- "traefik.http.services.${COMPOSE_PROJECT_NAME}mail.loadbalancer.server.port=8025"
88+
89+
# Code checks tools
90+
markdownlint:
91+
image: itkdev/markdownlint
92+
profiles:
93+
- dev
94+
volumes:
95+
- ./:/md
96+
97+
prettier:
98+
# Prettier does not (yet, fcf.
99+
# https://github.com/prettier/prettier/issues/15206) have an official
100+
# docker image.
101+
# https://hub.docker.com/r/jauderho/prettier is good candidate (cf. https://hub.docker.com/search?q=prettier&sort=updated_at&order=desc)
102+
image: jauderho/prettier
103+
profiles:
104+
- dev
105+
volumes:
106+
- ./:/work

0 commit comments

Comments
 (0)