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
32 changes: 27 additions & 5 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version:
version: &template_version
- drupal-7
- drupal-8
- drupal-9
Expand All @@ -21,14 +21,36 @@ jobs:

- name: Validate local docker compose files
run: |
DC=$(COMPOSE_DOMAIN=test.itkdev.dk docker compose --file templates/${{ matrix.version }}/docker-compose.yml config --quiet 2>&1)
DC=$(COMPOSE_DOMAIN=example.org docker compose --file templates/${{ matrix.version }}/docker-compose.yml config --quiet 2>&1)
[ -z "$DC" ] || { echo $DC; exit 1; }

- name: Validate server docker compose files
run: |
DC=$(COMPOSE_SERVER_DOMAIN=test.itkdev.dk docker compose --file templates/${{ matrix.version }}/docker-compose.server.yml config --quiet 2>&1)
DC=$(COMPOSE_SERVER_DOMAIN=example.org docker compose --file templates/${{ matrix.version }}/docker-compose.server.yml config --quiet 2>&1)
[ -z "$DC" ] || { echo $DC; exit 1; }
DC=$(COMPOSE_SERVER_DOMAIN=test.itkdev.dk docker compose --file templates/${{ matrix.version }}/docker-compose.server.yml --file templates/${{ matrix.version }}/docker-compose.dev.yml config --quiet 2>&1)
DC=$(COMPOSE_SERVER_DOMAIN=example.org docker compose --file templates/${{ matrix.version }}/docker-compose.server.yml --file templates/${{ matrix.version }}/docker-compose.dev.yml config --quiet 2>&1)
[ -z "$DC" ] || { echo $DC; exit 1; }
DC=$(COMPOSE_SERVER_DOMAIN=test.itkdev.dk docker compose --file templates/${{ matrix.version }}/docker-compose.server.yml --file templates/${{ matrix.version }}/docker-compose.redirect.yml config --quiet 2>&1)
DC=$(COMPOSE_SERVER_DOMAIN=example.org docker compose --file templates/${{ matrix.version }}/docker-compose.server.yml --file templates/${{ matrix.version }}/docker-compose.redirect.yml config --quiet 2>&1)
[ -z "$DC" ] || { echo $DC; exit 1; }

validate-nginx-conf:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: *template_version
compose_file:
- docker-compose.yml
- docker-compose.server.yml

name: Validate nginx conf (${{ matrix.version }}/${{ matrix.compose_file}})
steps:
- uses: actions/checkout@v5

- name: Create docker network
run: |
docker network create frontend

- name: Validate nginx conf
run: |
COMPOSE_DOMAIN=example.org docker compose --file templates/${{ matrix.version }}/${{ matrix.compose_file}} run --rm nginx nginx -t
2 changes: 1 addition & 1 deletion templates/drupal-10/.docker/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

# Note: set_real_ip_from is only set in the server block to make i configurable
# Note: set_real_ip_from is set in the server block

log_format main '$http_x_real_ip - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ server {
client_max_body_size ${NGINX_MAX_BODY_SIZE};

set_real_ip_from 172.16.0.0/16;
set_real_ip_from ${NGINX_SET_REAL_IP_FROM:-192.168.39.0/24};
set_real_ip_from 192.168.39.0/24;
real_ip_recursive on;
real_ip_header X-Forwarded-For;

Expand Down
2 changes: 1 addition & 1 deletion templates/drupal-11/.docker/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

# Note: set_real_ip_from is only set in the server block to make i configurable
# Note: set_real_ip_from is set in the server block

log_format main '$http_x_real_ip - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ server {
client_max_body_size ${NGINX_MAX_BODY_SIZE};

set_real_ip_from 172.16.0.0/16;
set_real_ip_from ${NGINX_SET_REAL_IP_FROM:-192.168.39.0/24};
set_real_ip_from 192.168.39.0/24;
real_ip_recursive on;
real_ip_header X-Forwarded-For;

Expand Down
2 changes: 1 addition & 1 deletion templates/drupal-7/.docker/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

# Note: set_real_ip_from is only set in the server block to make i configurable
# Note: set_real_ip_from is set in the server block

log_format main '$http_x_real_ip - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
Expand Down
2 changes: 1 addition & 1 deletion templates/drupal-7/.docker/templates/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ server {
client_max_body_size ${NGINX_MAX_BODY_SIZE};

set_real_ip_from 172.16.0.0/16;
set_real_ip_from ${NGINX_SET_REAL_IP_FROM:-192.168.39.0/24};
set_real_ip_from 192.168.39.0/24;
real_ip_recursive on;
real_ip_header X-Forwarded-For;

Expand Down
2 changes: 1 addition & 1 deletion templates/drupal-7/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ services:
# - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"

memcached:
image: "memcached:latest"
image: memcached:alpine
networks:
- app
ports:
Expand Down
2 changes: 1 addition & 1 deletion templates/drupal-8/.docker/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

# Note: set_real_ip_from is only set in the server block to make i configurable
# Note: set_real_ip_from is set in the server block

log_format main '$http_x_real_ip - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
Expand Down
2 changes: 1 addition & 1 deletion templates/drupal-8/.docker/templates/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ server {
client_max_body_size ${NGINX_MAX_BODY_SIZE};

set_real_ip_from 172.16.0.0/16;
set_real_ip_from ${NGINX_SET_REAL_IP_FROM:-192.168.39.0/24};
set_real_ip_from 192.168.39.0/24;
real_ip_recursive on;
real_ip_header X-Forwarded-For;

Expand Down
2 changes: 1 addition & 1 deletion templates/drupal-8/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ services:
# - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"

memcached:
image: "memcached:latest"
image: memcached:alpine
networks:
- app
ports:
Expand Down
2 changes: 1 addition & 1 deletion templates/drupal-9/.docker/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

# Note: set_real_ip_from is only set in the server block to make i configurable
# Note: set_real_ip_from is set in the server block

log_format main '$http_x_real_ip - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
Expand Down
2 changes: 1 addition & 1 deletion templates/drupal-9/.docker/templates/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ server {
client_max_body_size ${NGINX_MAX_BODY_SIZE};

set_real_ip_from 172.16.0.0/16;
set_real_ip_from ${NGINX_SET_REAL_IP_FROM:-192.168.39.0/24};
set_real_ip_from 192.168.39.0/24;
real_ip_recursive on;
real_ip_header X-Forwarded-For;

Expand Down
2 changes: 1 addition & 1 deletion templates/drupal-9/docker-compose.server.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# itk-version: 3.2.2
# itk-version: 3.2.4
networks:
frontend:
external: true
Expand Down
2 changes: 1 addition & 1 deletion templates/drupal-9/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ services:
# - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"

memcached:
image: "memcached:latest"
image: memcached:alpine
networks:
- app
ports:
Expand Down
2 changes: 1 addition & 1 deletion templates/symfony-3/.docker/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

# Note: set_real_ip_from is only set in the server block to make i configurable
# Note: set_real_ip_from is set in the server block

log_format main '$http_x_real_ip - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ server {
client_max_body_size ${NGINX_MAX_BODY_SIZE};

set_real_ip_from 172.16.0.0/16;
set_real_ip_from ${NGINX_SET_REAL_IP_FROM:-192.168.39.0/24};
set_real_ip_from 192.168.39.0/24;
real_ip_recursive on;
real_ip_header X-Forwarded-For;

Expand Down
2 changes: 1 addition & 1 deletion templates/symfony-4/.docker/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

# Note: set_real_ip_from is only set in the server block to make i configurable
# Note: set_real_ip_from is set in the server block

log_format main '$http_x_real_ip - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ server {
client_max_body_size ${NGINX_MAX_BODY_SIZE};

set_real_ip_from 172.16.0.0/16;
set_real_ip_from ${NGINX_SET_REAL_IP_FROM:-192.168.39.0/24};
set_real_ip_from 192.168.39.0/24;
real_ip_recursive on;
real_ip_header X-Forwarded-For;

Expand Down
2 changes: 1 addition & 1 deletion templates/symfony-6/.docker/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

# Note: set_real_ip_from is only set in the server block to make i configurable
# Note: set_real_ip_from is set in the server block

log_format main '$http_x_real_ip - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ server {
client_max_body_size ${NGINX_MAX_BODY_SIZE};

set_real_ip_from 172.16.0.0/16;
set_real_ip_from ${NGINX_SET_REAL_IP_FROM:-192.168.39.0/24};
set_real_ip_from 192.168.39.0/24;
real_ip_recursive on;
real_ip_header X-Forwarded-For;

Expand Down