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: unit-test-and-lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- name: Setup Node.js 24.x - name: Setup Node.js 24.x
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
@@ -52,10 +52,10 @@ jobs:
outputs: outputs:
image_sha_tag: ${{ steps.image-tag.outputs.image_sha_tag }} image_sha_tag: ${{ steps.image-tag.outputs.image_sha_tag }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: docker/setup-buildx-action@v3 - uses: docker/setup-buildx-action@v4
- name: Log in to GitHub Container Registry - name: Log in to GitHub Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v4
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
@@ -78,7 +78,7 @@ jobs:
echo "EOF" echo "EOF"
} >> "$GITHUB_OUTPUT" } >> "$GITHUB_OUTPUT"
- name: Build and push frontend image - name: Build and push frontend image
uses: docker/build-push-action@v5 uses: docker/build-push-action@v7
with: with:
context: ./frontend/ context: ./frontend/
file: ./frontend/Dockerfile file: ./frontend/Dockerfile
@@ -98,10 +98,10 @@ jobs:
outputs: outputs:
image_sha_tag: ${{ steps.image-tag.outputs.image_sha_tag }} image_sha_tag: ${{ steps.image-tag.outputs.image_sha_tag }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: docker/setup-buildx-action@v3 - uses: docker/setup-buildx-action@v4
- name: Log in to GitHub Container Registry - name: Log in to GitHub Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v4
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
@@ -124,7 +124,7 @@ jobs:
echo "EOF" echo "EOF"
} >> "$GITHUB_OUTPUT" } >> "$GITHUB_OUTPUT"
- name: Build and push e2e image - name: Build and push e2e image
uses: docker/build-push-action@v5 uses: docker/build-push-action@v7
with: with:
context: ./e2e/ context: ./e2e/
file: ./e2e/Dockerfile file: ./e2e/Dockerfile
@@ -147,31 +147,33 @@ jobs:
FRONTEND_IMAGE: ${{ needs.build-fe.outputs.image_sha_tag }} FRONTEND_IMAGE: ${{ needs.build-fe.outputs.image_sha_tag }}
E2E_IMAGE: ${{ needs.build-e2e.outputs.image_sha_tag }} E2E_IMAGE: ${{ needs.build-e2e.outputs.image_sha_tag }}
steps: 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 - name: Log in to GitHub Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v4
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull images for test run - 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 - 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 - name: Upload Playwright HTML report
if: always() if: always()
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v7
with: with:
name: playwright-report name: playwright-report
path: e2e/playwright-report path: e2e/playwright-report
if-no-files-found: ignore if-no-files-found: ignore
- name: Upload Playwright test results - name: Upload Playwright test results
if: always() if: always()
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v7
with: with:
name: playwright-test-results name: playwright-test-results
path: e2e/test-results path: e2e/test-results
if-no-files-found: ignore if-no-files-found: ignore
- name: Tear down Docker Compose stack - name: Tear down Docker Compose stack
if: always() 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): For a fully containerized end-to-end run (tagged backend image + freshly built frontend/e2e images):
```shell ```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. 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: ports:
- "8000:8000" - "8000:8000"
volumes: volumes:
- ./nginx.e2e.conf:/etc/nginx/nginx.conf:ro - ./e2e.nginx.conf:/etc/nginx/nginx.conf:ro
- tls-certs:/etc/nginx/certs:ro - tls-certs:/etc/nginx/certs:ro
depends_on: depends_on:
certs: certs:
View File
+2 -2
View File
@@ -43,14 +43,14 @@ Prerequisites:
Run: Run:
```shell ```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: Run with a different backend tag:
```shell ```shell
BACKEND_IMAGE=ghcr.io/morbalint/kemkas-backend:<tag> \ 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. The `certs` service generates a local CA and nginx server certificate in a shared volume.