Skip to content

Commit c51d2a1

Browse files
committed
Merge remote-tracking branch 'origin/feature/update-infrastructure-for-mono-repo' into feature/5402-align-nginx-env-vars
# Conflicts: # CHANGELOG.md # infrastructure/nginx/Dockerfile
2 parents c0d559c + 795d70c commit c51d2a1

30 files changed

Lines changed: 205 additions & 281 deletions

.docker/nginx.conf

Lines changed: 0 additions & 36 deletions
This file was deleted.

.docker/templates/default.conf.template

Lines changed: 0 additions & 52 deletions
This file was deleted.

.dockerignore

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
!/.git/config
33

44
# Unneeded application files
5-
/.docker/data/README.md
5+
/.docker
66
/.github
77
/docs
88
/fixtures
@@ -15,6 +15,22 @@
1515
/scripts
1616
/tests
1717

18+
# IDE / editor state
19+
/.idea
20+
/.vscode
21+
22+
# Compose / task runner / dev tooling configs (not consumed at runtime)
23+
/docker-compose*.yml
24+
/Taskfile.yml
25+
/playwright.config.ts
26+
27+
# CI / quality-tool configs (not consumed at runtime)
28+
/phpstan.dist.neon
29+
/phpunit.xml.dist
30+
/psalm.xml
31+
/psalm-baseline.xml
32+
/rector.php
33+
1834
###> symfony/framework-bundle ###
1935
/.env.local
2036
/.env.local.php

.github/workflows/apispec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
name: API Specification validation
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@v6
1515
with:
1616
fetch-depth: 2
1717

.github/workflows/build-images.yml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
name: Build docker images
3+
4+
on:
5+
push:
6+
branches:
7+
- develop
8+
tags:
9+
- "*"
10+
11+
jobs:
12+
docker:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
steps:
18+
- uses: actions/checkout@v6
19+
20+
- name: Set up QEMU
21+
uses: docker/setup-qemu-action@v4
22+
23+
- name: Set up Docker Buildx
24+
uses: docker/setup-buildx-action@v4
25+
26+
- name: Login to GHCR
27+
uses: docker/login-action@v4
28+
with:
29+
registry: ghcr.io
30+
username: ${{ github.actor }}
31+
password: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Docker meta (API)
34+
id: meta-api
35+
uses: docker/metadata-action@v6
36+
with:
37+
images: ghcr.io/os2display/display-api-service
38+
tags: |
39+
# develop branch → 'develop'
40+
type=ref,event=branch
41+
# any tag → tag literal (e.g. '3.0.0', '3.0.0-RC1' for release
42+
# candidates cut from release/X.Y.Z)
43+
type=ref,event=tag
44+
# also emit canonical semver tag for valid semver-shaped tags,
45+
# so '3.0.0' and '3.0.0-RC1' both produce a properly-typed entry.
46+
type=semver,pattern={{version}}
47+
# latest=auto adds ':latest' only for non-prerelease semver tags,
48+
# so '3.0.0' updates ':latest' but '3.0.0-RC1' does not.
49+
flavor: |
50+
latest=auto
51+
52+
- name: Build and push (API)
53+
uses: docker/build-push-action@v7
54+
with:
55+
context: ./infrastructure/display-api-service/
56+
file: ./infrastructure/display-api-service/Dockerfile
57+
build-contexts: |
58+
repository-root=.
59+
# Use the version computed by docker/metadata-action so APP_VERSION
60+
# matches the image tag for every trigger ('develop' / '3.0.0' /
61+
# '3.0.0-RC1') without bespoke string handling per trigger.
62+
build-args: |
63+
APP_VERSION=${{ steps.meta-api.outputs.version }}
64+
APP_RELEASE_VERSION=${{ steps.meta-api.outputs.version }}
65+
APP_RELEASE_TIMESTAMP=${{ github.run_number }}
66+
push: true
67+
tags: ${{ steps.meta-api.outputs.tags }}
68+
labels: ${{ steps.meta-api.outputs.labels }}
69+
provenance: mode=max
70+
sbom: true
71+
platforms: linux/amd64,linux/arm64
72+
# mode=max caches builder stages (client_app_builder, api_app_builder),
73+
# which is what makes multi-arch builds practical to cache at all.
74+
# Scoped per image so API and Nginx caches don't evict each other.
75+
cache-from: type=gha,scope=display-api-service
76+
cache-to: type=gha,mode=max,scope=display-api-service
77+
78+
- name: Docker meta (Nginx)
79+
id: meta-nginx
80+
uses: docker/metadata-action@v6
81+
with:
82+
images: ghcr.io/os2display/display-api-service-nginx
83+
tags: |
84+
# develop branch → 'develop'
85+
type=ref,event=branch
86+
# any tag → tag literal (e.g. '3.0.0', '3.0.0-RC1' for release
87+
# candidates cut from release/X.Y.Z)
88+
type=ref,event=tag
89+
# also emit canonical semver tag for valid semver-shaped tags,
90+
# so '3.0.0' and '3.0.0-RC1' both produce a properly-typed entry.
91+
type=semver,pattern={{version}}
92+
flavor: |
93+
latest=auto
94+
95+
- name: Build and push (Nginx)
96+
uses: docker/build-push-action@v7
97+
with:
98+
context: ./infrastructure/nginx/
99+
file: ./infrastructure/nginx/Dockerfile
100+
build-contexts: |
101+
repository-root=.
102+
build-args: |
103+
APP_VERSION=${{ steps.meta-nginx.outputs.version }}
104+
APP_RELEASE_VERSION=${{ steps.meta-nginx.outputs.version }}
105+
APP_RELEASE_TIMESTAMP=${{ github.run_number }}
106+
push: true
107+
tags: ${{ steps.meta-nginx.outputs.tags }}
108+
labels: ${{ steps.meta-nginx.outputs.labels }}
109+
provenance: mode=max
110+
sbom: true
111+
platforms: linux/amd64,linux/arm64
112+
cache-from: type=gha,scope=display-api-service-nginx
113+
cache-to: type=gha,mode=max,scope=display-api-service-nginx

.github/workflows/changelog.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
fail-fast: false
1919
steps:
2020
- name: Checkout
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v6
2222
with:
2323
fetch-depth: 2
2424

.github/workflows/composer.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
strategy:
4242
fail-fast: false
4343
steps:
44-
- uses: actions/checkout@v4
44+
- uses: actions/checkout@v6
4545
- run: |
4646
docker network create frontend
4747
docker compose run --rm phpfpm composer validate --strict
@@ -51,7 +51,7 @@ jobs:
5151
strategy:
5252
fail-fast: false
5353
steps:
54-
- uses: actions/checkout@v4
54+
- uses: actions/checkout@v6
5555
- run: |
5656
docker network create frontend
5757
docker compose run --rm phpfpm composer install

.github/workflows/composer_install.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
name: Composer install in prod mode
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@v6
1515

1616
- name: Setup network
1717
run: docker network create frontend

.github/workflows/docker_build_images_from_develop.yml

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)