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
11 changes: 10 additions & 1 deletion .docker/templates/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,20 @@ 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 = /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;
}

location / {
# try to serve file directly, fallback to index.php
try_files $uri /index.php$is_args$args;
Expand Down
76 changes: 38 additions & 38 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
on:
push:
tags:
- "*.*.*"
push:
tags:
- "*.*.*"

name: Create Github Release

permissions:
contents: write
contents: write

env:
COMPOSE_USER: runner
COMPOSE_USER: runner

jobs:
create-release:
runs-on: ubuntu-latest
env:
COMPOSER_ALLOW_SUPERUSER: 1
APP_ENV: prod
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Composer install
run: |
docker network create frontend
docker compose run --rm --user=root -e APP_ENV=prod phpfpm composer install --no-dev --optimize-autoloader
docker compose run --rm --user=root -e APP_ENV=prod phpfpm composer clear-cache

- name: Make assets dir
run: |
mkdir -p ../assets

- name: Create archive
run: |
sudo chown -R runner:runner ./
tar --exclude='.git' -zcf ../assets/${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz ./

- name: Create checksum
run: |
cd ../assets
sha256sum ${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz > ../assets/checksum.txt

- name: Create a release in GitHub and uploads assets
run: gh release create ${{ github.ref_name }} --verify-tag --generate-notes ../assets/*.*
create-release:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
shell: bash
COMPOSER_ALLOW_SUPERUSER: 1
APP_ENV: prod
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Composer install
run: |
docker network create frontend
docker compose run --rm --user=root -e APP_ENV=prod phpfpm composer install --no-dev --optimize-autoloader
docker compose run --rm --user=root -e APP_ENV=prod phpfpm composer clear-cache

- name: Make assets dir
run: |
mkdir -p ../assets

- name: Create archive
run: |
sudo chown -R runner:runner ./
tar --exclude='.git' -zcf ../assets/${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz ./

- name: Create checksum
run: |
cd ../assets
sha256sum ${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz > ../assets/checksum.txt

- name: Create a release in GitHub and uploads assets
run: gh release create ${{ github.ref_name }} --verify-tag --generate-notes ../assets/*.*
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
shell: bash
28 changes: 14 additions & 14 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
name: Changelog

on:
pull_request:
pull_request:

jobs:
changelog:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
changelog:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 2

- name: Git fetch
run: git fetch
- name: Git fetch
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
- name: Check that changelog has been updated.
run: git diff --exit-code origin/${{ github.base_ref }} -- CHANGELOG.md && exit 1 || exit 0
80 changes: 46 additions & 34 deletions .github/workflows/composer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,43 +26,55 @@
name: Composer

env:
COMPOSE_USER: root
COMPOSE_USER: runner

on:
pull_request:
push:
branches:
- main
- develop
pull_request:
push:
branches:
- main
- develop

jobs:
composer-validate:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- run: |
docker network create frontend
docker compose run --rm phpfpm composer validate --strict
composer-validate:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v5

composer-normalized:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- run: |
docker network create frontend
docker compose run --rm phpfpm composer install
docker compose run --rm phpfpm composer normalize --dry-run
- name: Create docker network
run: |
docker network create frontend

composer-audit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- run: |
docker network create frontend
docker compose run --rm phpfpm composer audit
- run: |
docker compose run --rm phpfpm composer validate --strict

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

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

- run: |
docker compose run --rm phpfpm composer install
docker compose run --rm phpfpm composer normalize --dry-run

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

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

- run: |
docker compose run --rm phpfpm composer audit
33 changes: 17 additions & 16 deletions .github/workflows/javascript.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,24 @@
name: JavaScript

on:
pull_request:
push:
branches:
- main
- develop
pull_request:
push:
branches:
- main
- develop

jobs:
javascript-lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
javascript-lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v5

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

- run: |
docker compose run --rm prettier 'assets/**/*.js' --check
- run: |
docker compose run --rm prettier 'assets/**/*.js' --check
33 changes: 17 additions & 16 deletions .github/workflows/markdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,24 @@
name: Markdown

on:
pull_request:
push:
branches:
- main
- develop
pull_request:
push:
branches:
- main
- develop

jobs:
markdown-lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
markdown-lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v5

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

- run: |
docker compose run --rm markdownlint markdownlint '**/*.md'
- run: |
docker compose run --rm markdownlint markdownlint '**/*.md'
36 changes: 20 additions & 16 deletions .github/workflows/php.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,27 @@
name: Symfony PHP

env:
COMPOSE_USER: root
COMPOSE_USER: runner

on:
pull_request:
push:
branches:
- main
- develop
pull_request:
push:
branches:
- main
- develop

jobs:
coding-standards:
name: PHP - Check Coding Standards
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
docker network create frontend
docker compose run --rm phpfpm composer install
# https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/usage.rst#the-check-command
docker compose run --rm phpfpm vendor/bin/php-cs-fixer fix --dry-run --diff
coding-standards:
name: PHP - Check Coding Standards
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

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

- run: |
docker compose run --rm phpfpm composer install
# https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/usage.rst#the-check-command
docker compose run --rm phpfpm vendor/bin/php-cs-fixer fix --dry-run --diff
Loading
Loading