Skip to content
Open
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
8 changes: 4 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
outputs:
turnierplan_version: ${{ steps.extract-version.outputs.turnierplan_version }}

container-image:
name: 'Build container image'
container-image-amd64:
name: 'Build container image (amd64)'
runs-on: ubuntu-24.04
permissions:
contents: read
Expand All @@ -51,8 +51,8 @@ jobs:
- name: 'Build and push container image'
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: ./src
file: ./src/Turnierplan.App/Dockerfile
context: .
file: ./docker/turnierplan-amd64/Dockerfile
push: true
# Note: Always push "latest" even when building from a non-main branch. This is because currently, no patches are released for a non-latest minor release.
tags: 'ghcr.io/turnierplan-net/turnierplan:latest,ghcr.io/turnierplan-net/turnierplan:${{ needs.extract-version.outputs.turnierplan_version }}'
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ jobs:
if: ${{ env.RUN_SONARQUBE_ANALYSIS == 'true' }}
run: 'dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"'
working-directory: './src'
e2e:
name: 'E2E Tests'

e2e-amd64:
name: 'E2E Tests (amd64)'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
Expand All @@ -87,7 +88,7 @@ jobs:
run: 'npm ci'
working-directory: './src/Turnierplan.App/Client/'
- name: 'Prepare e2e test environment'
run: 'npm run e2e:prepare'
run: 'npm run e2e:prepare:amd64'
working-directory: './src/Turnierplan.App/Client/'
- name: 'Run e2e tests'
run: 'npm run e2e:run'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ If you have an Entra ID app registration with the necessary permissions on the s

## Documentation

The developer documentation of **turnierplan.NET** is located in the `docs` directory of this repository.
The developer documentation of **turnierplan.NET** is located in the `docs` directory of this repository. Information about the container images and how to build them can be found in the [README.md in the docker folder](./docker/README.md).

## Development

Expand Down
3 changes: 3 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# turnierplan.NET · Docker Images

### TODO: Write this documentation
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:10.0.1-alpine3.23-amd64 AS base

# Where are the files stored in the container? This folder should be mapped as a volume
# Where are the files stored inside the container? This folder should be mapped as a volume
ARG DATA_DIRECTORY=/var/turnierplan

FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:10.0.101-noble-amd64 AS build

# Copy the source files and build the solution.
WORKDIR /src
COPY . .
COPY src /src/
WORKDIR "/src/Turnierplan.App"
RUN dotnet build "./Turnierplan.App.csproj" -c Release -o /app/build

Expand All @@ -21,16 +20,11 @@ RUN dotnet publish "./Turnierplan.App.csproj" -c Release --runtime linux-x64 -o

FROM base AS final

# Since .NET 8, the official container image no longer includes the 'Kerberos' package. Since Npgsql 10.0, an
# error is shown upon startup if that package is not installed. Because of this, we install the package manually.
# The official documentation states you have to install the 'libkrb5-3' package:
# - https://learn.microsoft.com/en-us/dotnet/core/compatibility/containers/8.0/krb5-libs-package
# However, this seems to have no effect. By digging in the 'dotnet-docker' repository, you can find the Dockerfile
# used for the .NET 6 images which states the 'libgssapi-krb5-2' package which is installed below.
# - source: https://github.com/dotnet/dotnet-docker/blob/0a4258cc250885be5162d01f178bff5c856291f4/src/runtime-deps/6.0/jammy/amd64/Dockerfile
RUN apt-get update \
&& apt-get -y install libgssapi-krb5-2 \
&& rm -rf /var/lib/apt/lists/*
# Install some packages:
# - 'gcompat' to run QuestPDF dependencies on Alpine Linux
# - 'krb5-libs' to enable Npgsql GSS session encryption
# - 'tzdata' contains relevant time zone information
RUN apk add gcompat krb5-libs tzdata

# Prepare the directory used by the turnierplan.NET application
RUN mkdir "$DATA_DIRECTORY" && chown "$APP_UID" "$DATA_DIRECTORY"
Expand Down
6 changes: 3 additions & 3 deletions src/Turnierplan.App/Client/cypress/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# This docker compose file is used for running the E2E tests during the CI workflow

services:
turnierplan.e2e.application:
turnierplan.e2e.application.amd64:
build:
dockerfile: 'Turnierplan.App/Dockerfile'
context: '../../../../'
dockerfile: 'docker/turnierplan-amd64/Dockerfile'
context: '../../../../../'
ports:
- "45001:8080"
environment:
Expand Down
2 changes: 1 addition & 1 deletion src/Turnierplan.App/Client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"test:ci": "ng test --watch=false --source-map=true --code-coverage --browsers ChromeHeadless",
"e2e:swap-environment": "replace-in-file \"environment.prod.ts\" \"environment.e2e.ts\" angular.json",
"e2e:swap-environment-back": "replace-in-file \"environment.e2e.ts\" \"environment.prod.ts\" angular.json",
"e2e:prepare": "npm run e2e:swap-environment && docker compose -f cypress/docker/docker-compose.yaml up --build -d && npm run e2e:swap-environment-back",
"e2e:prepare:amd64": "npm run e2e:swap-environment && docker compose -f cypress/docker/docker-compose.yaml up --build -d turnierplan.e2e.application.amd64 && npm run e2e:swap-environment-back",
"e2e:destroy": "docker compose -f cypress/docker/docker-compose.yaml down",
"e2e:open": "npx cypress open",
"e2e:run": "npx cypress run"
Expand Down
6 changes: 0 additions & 6 deletions src/Turnierplan.App/Turnierplan.App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@
<ProjectReference Include="..\Turnierplan.PdfRendering\Turnierplan.PdfRendering.csproj" />
</ItemGroup>

<ItemGroup>
<Content Include="..\.dockerignore">
<Link>.dockerignore</Link>
</Content>
</ItemGroup>

<Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish">
<!-- As part of publishing, ensure the JS resources are freshly built in production mode -->
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
Expand Down
Loading