2 Commits

Author SHA1 Message Date
morbalint a11348e197 rename nginx conf too 2026-04-05 10:36:19 +02:00
morbalint 5cd94ce583 rename docker compose 2026-04-05 10:23:12 +02:00
5 changed files with 22 additions and 20 deletions
+18 -16
View File
@@ -15,7 +15,7 @@ jobs:
unit-test-and-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Setup Node.js 24.x
uses: actions/setup-node@v4
with:
@@ -52,10 +52,10 @@ jobs:
outputs:
image_sha_tag: ${{ steps.image-tag.outputs.image_sha_tag }}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: actions/checkout@v6
- uses: docker/setup-buildx-action@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
@@ -78,7 +78,7 @@ jobs:
echo "EOF"
} >> "$GITHUB_OUTPUT"
- name: Build and push frontend image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v7
with:
context: ./frontend/
file: ./frontend/Dockerfile
@@ -98,10 +98,10 @@ jobs:
outputs:
image_sha_tag: ${{ steps.image-tag.outputs.image_sha_tag }}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: actions/checkout@v6
- uses: docker/setup-buildx-action@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
@@ -124,7 +124,7 @@ jobs:
echo "EOF"
} >> "$GITHUB_OUTPUT"
- name: Build and push e2e image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v7
with:
context: ./e2e/
file: ./e2e/Dockerfile
@@ -147,31 +147,33 @@ jobs:
FRONTEND_IMAGE: ${{ needs.build-fe.outputs.image_sha_tag }}
E2E_IMAGE: ${{ needs.build-e2e.outputs.image_sha_tag }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Setup docker compose
uses: docker/setup-compose-action@v2
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull images for test run
run: docker compose -f docker-compose.e2e.yaml pull
run: docker compose -f e2e.docker-compose.yaml pull
- name: Run Docker Compose E2E tests
run: docker compose -f docker-compose.e2e.yaml up --no-build --abort-on-container-exit --exit-code-from e2e e2e
run: docker compose -f e2e.docker-compose.yaml up --no-build --abort-on-container-exit --exit-code-from e2e e2e
- name: Upload Playwright HTML report
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: playwright-report
path: e2e/playwright-report
if-no-files-found: ignore
- name: Upload Playwright test results
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: playwright-test-results
path: e2e/test-results
if-no-files-found: ignore
- name: Tear down Docker Compose stack
if: always()
run: docker compose -f docker-compose.e2e.yaml down -v --remove-orphans
run: docker compose -f e2e.docker-compose.yaml down -v --remove-orphans
+1 -1
View File
@@ -31,7 +31,7 @@ Later start the docker compose first and the project launch settings after the D
For a fully containerized end-to-end run (tagged backend image + freshly built frontend/e2e images):
```shell
docker compose -f docker-compose.e2e.yaml up --build --abort-on-container-exit --exit-code-from e2e e2e
docker compose -f e2e.docker-compose.yaml up --build --abort-on-container-exit --exit-code-from e2e e2e
```
Use `BACKEND_IMAGE` to select a specific backend tag, and note this compose stack auto-generates TLS certificates for the nginx proxy.
@@ -41,7 +41,7 @@ services:
ports:
- "8000:8000"
volumes:
- ./nginx.e2e.conf:/etc/nginx/nginx.conf:ro
- ./e2e.nginx.conf:/etc/nginx/nginx.conf:ro
- tls-certs:/etc/nginx/certs:ro
depends_on:
certs:
View File
+2 -2
View File
@@ -43,14 +43,14 @@ Prerequisites:
Run:
```shell
docker compose -f docker-compose.e2e.yaml up --build --abort-on-container-exit --exit-code-from e2e e2e
docker compose -f e2e.docker-compose.yaml up --build --abort-on-container-exit --exit-code-from e2e e2e
```
Run with a different backend tag:
```shell
BACKEND_IMAGE=ghcr.io/morbalint/kemkas-backend:<tag> \
docker compose -f docker-compose.e2e.yaml up --build --abort-on-container-exit --exit-code-from e2e e2e
docker compose -f e2e.docker-compose.yaml up --build --abort-on-container-exit --exit-code-from e2e e2e
```
The `certs` service generates a local CA and nginx server certificate in a shared volume.