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
4 changes: 2 additions & 2 deletions .docker/data/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Ignore everything in this directory
*
# Except this file
# Except
!.gitignore
!Readme.md
!README.md
4 changes: 1 addition & 3 deletions .docker/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

set_real_ip_from 172.16.0.0/16;
real_ip_recursive on;
real_ip_header X-Forwarded-For;
# 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
19 changes: 13 additions & 6 deletions .docker/templates/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,24 @@ server {

client_max_body_size ${NGINX_MAX_BODY_SIZE};

# This also needs to be set in the single server tag and not only in http.
set_real_ip_from 172.16.0.0/16;
set_real_ip_from 192.168.39.0/24;
real_ip_recursive on;
real_ip_header X-Forwarded-For;

location / {
# We are co-hosting with the legacy EventDB, so this app is hosted under '/api/v2/' (.env::APP_PATH_PREFIX)
# This is configured for Symfony in both 'api_platform.prefix' and 'framework.assets.base_path'. However
# Symfony still installs assets in the root path so we need to rewrite the uri to remove '/api/v2/'.
rewrite ^${APP_PATH_PREFIX}/(.*) /$1 break;
location = /cron-metrics {
# Proxy to supercronic metrics
proxy_pass http://${NGINX_CRON_METRICS}/metrics;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

# Project-specific server config (.docker/templates/server.d/*.conf.template).
include /etc/nginx/conf.d/server.d/*.conf;

location / {
# try to serve file directly, fallback to index.php
try_files $uri /index.php$is_args$args;
}
Expand Down
4 changes: 4 additions & 0 deletions .docker/templates/server.d/app-path-prefix.conf.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This app shares the domain with event-database-imports, so this app is served under '/api/v2/' (.env::APP_PATH_PREFIX).
# This is configured for Symfony in both 'api_platform.prefix' and 'framework.assets.base_path'. However
# Symfony still installs assets in the root path so we need to rewrite the uri to remove '/api/v2/'.
rewrite ^${APP_PATH_PREFIX}/(.*) /$1 break;
4 changes: 2 additions & 2 deletions .github/workflows/api-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
uses: actions/cache@v5
with:
path: vendor
key: vendor-php8.4-${{ hashFiles('composer.lock') }}
restore-keys: vendor-php8.4-
key: vendor-php8.5-${{ hashFiles('composer.lock') }}
restore-keys: vendor-php8.5-

- name: Install dependencies
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ on:
jobs:
changelog:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v7
Expand All @@ -26,4 +24,6 @@ jobs:
run: git fetch

- name: Check that changelog has been updated.
run: git diff --exit-code origin/${{ github.base_ref }} -- CHANGELOG.md && exit 1 || exit 0
env:
BASE_REF: ${{ github.base_ref }}
run: git diff --exit-code "origin/$BASE_REF" -- CHANGELOG.md && exit 1 || exit 0
13 changes: 6 additions & 7 deletions .github/workflows/composer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,23 @@
name: Composer

env:
COMPOSE_USER: root
COMPOSE_USER: runner

on:
pull_request:
paths: &paths
- "composer.json"
- "composer.lock"
- "docker-compose.yml"
push:
branches:
- main
- develop
paths: *paths

jobs:
composer-validate:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v7

Expand All @@ -52,8 +55,6 @@ jobs:

composer-normalized:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v7

Expand All @@ -67,8 +68,6 @@ jobs:

composer-audit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v7

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/markdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@ name: Markdown

on:
pull_request:
paths: &paths
- "**/*.md"
push:
branches:
- main
- develop
paths: *paths

jobs:
markdown-lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v7
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/php.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,20 @@
name: Symfony PHP

env:
COMPOSE_USER: root
COMPOSE_USER: runner

on:
pull_request:
paths: &paths
- "**/*.php"
- "composer.json"
- "composer.lock"
- "docker-compose.yml"
push:
branches:
- main
- develop
paths: *paths

jobs:
coding-standards:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
uses: actions/cache@v5
with:
path: vendor
key: vendor-php8.4-${{ hashFiles('composer.lock') }}
restore-keys: vendor-php8.4-
key: vendor-php8.5-${{ hashFiles('composer.lock') }}
restore-keys: vendor-php8.5-

- name: Start docker compose setup and install site
run: |
Expand Down Expand Up @@ -57,8 +57,8 @@ jobs:
uses: actions/cache@v5
with:
path: vendor
key: vendor-php8.4-${{ hashFiles('composer.lock') }}
restore-keys: vendor-php8.4-
key: vendor-php8.5-${{ hashFiles('composer.lock') }}
restore-keys: vendor-php8.5-

- name: Install dependencies
run: |
Expand All @@ -81,8 +81,8 @@ jobs:
uses: actions/cache@v5
with:
path: vendor
key: vendor-php8.4-${{ hashFiles('composer.lock') }}
restore-keys: vendor-php8.4-
key: vendor-php8.5-${{ hashFiles('composer.lock') }}
restore-keys: vendor-php8.5-

- name: Install dependencies
run: |
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/twig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,24 @@
name: Twig

env:
COMPOSE_USER: root
COMPOSE_USER: runner

on:
pull_request:
paths: &paths
- "**/*.twig"
- "composer.json"
- "composer.lock"
- "docker-compose.yml"
push:
branches:
- main
- develop
paths: *paths

jobs:
twig-lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v7
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/yaml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ name: YAML

on:
pull_request:
paths: &paths
- "**/*.yml"
- "**/*.yaml"
push:
branches:
- main
- develop
paths: *paths

jobs:
yaml-lint:
Expand All @@ -38,4 +42,4 @@ jobs:
docker network create frontend

- run: |
docker compose run --rm prettier '**/*.{yml,yaml}' --check
docker compose run --rm prettier --no-editorconfig '**/*.{yml,yaml}' --check
2 changes: 2 additions & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
vendor/
node_modules/
LICENSE.md
# Python
.venv/
# Drupal
web/*.md
web/core/
Expand Down
5 changes: 3 additions & 2 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

// This file is copied from config/symfony/php/.php-cs-fixer.dist.php in https://github.com/itk-dev/devops_itkdev-docker.
// Feel free to edit the file, but consider making a pull request if you find a general issue with the file.

Expand All @@ -16,8 +17,8 @@
$config->setFinder($finder);

$config->setRules([
'@Symfony' => true,
'phpdoc_align' => false,
'@Symfony' => true,
'phpdoc_align' => false,
]);

return $config;
7 changes: 7 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@

# https://prettier.io/docs/configuration
overrides:
# https://taskfile.dev/docs/styleguide
- files:
- "Taskfile.{yml,yaml}"
options:
tabWidth: 2
singleQuote: true

# Symfony config
- files:
- "config/**/*.{yml,yaml}"
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ See [keep a changelog] for information about writing changes to this log.

## [Unreleased]

- [PR-70](https://github.com/itk-dev/event-database-api/pull/70)
Update the docker compose template (itk-version 3.2.4) and the PHP 8.5 image

## [1.3.0] - 2026-11-04

- [PR-62](https://github.com/itk-dev/event-database-api/pull/62)
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ API platform front-end for the Danish event database used by the municipality of
`migrations/` and `src/Entity/` directories are empty).

Stack: PHP 8.3+, Symfony 7.4, API Platform 4.3, Elasticsearch 8.x. Runs entirely in Docker via
`itkdev/php8.4-fpm` + nginx.
`itkdev/php8.5-fpm` + nginx.

## Common commands

Expand Down
Loading
Loading