Files
BirthList/deploy/portainer-stack.yml
T
Arne Moerman 0d8194a1d9
Build and Push Docker Image / build-and-push (push) Failing after 16s
Add PublicUrl support for reverse proxy handling
Introduced a `PUBLIC_URL` environment variable to configure the
public URL for OAuth callbacks and reverse proxy scenarios. Updated
`Program.cs` to rewrite request scheme and host based on `PublicUrl`.
Replaced `Microsoft.AspNetCore.Components.Authorization` with
`Microsoft.AspNetCore.Components.Authentication`. Added `PublicUrl`
to `appsettings.json` with a default empty value.
2026-05-17 22:06:16 +02:00

70 lines
2.0 KiB
YAML

version: '3.8'
services:
birthlist:
image: git.arnemoerman.be/arne/birthlist:latest
container_name: birthlist
ports:
- "5022:8080"
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_URLS=http://+:8080
- Data__Provider=SqlServer
- ConnectionStrings__DefaultConnection=Server=mssql;User Id=sa;Password=${SA_PASSWORD};Initial Catalog=BirthList;Encrypt=false;TrustServerCertificate=true
- Authentication__Google__ClientId=${GOOGLE_CLIENT_ID}
- Authentication__Google__ClientSecret=${GOOGLE_CLIENT_SECRET}
- Authentication__Microsoft__ClientId=${MICROSOFT_CLIENT_ID}
- Authentication__Microsoft__ClientSecret=${MICROSOFT_CLIENT_SECRET}
- Smtp__Host=${SMTP_HOST}
- Smtp__Port=${SMTP_PORT}
- Smtp__EnableSsl=${SMTP_ENABLE_SSL}
- Smtp__UserName=${SMTP_USERNAME}
- Smtp__Password=${SMTP_PASSWORD}
- Smtp__FromAddress=${SMTP_FROM_ADDRESS}
- Smtp__FromName=${SMTP_FROM_NAME}
- PublicUrl=${PUBLIC_URL}
depends_on:
- mssql
networks:
- birthlist-network
- caddy-net
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pidof dotnet > /dev/null || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
labels:
- "com.centurylinklabs.watchtower.enable=true"
mssql:
image: mcr.microsoft.com/mssql/server:2022-latest
container_name: birthlist-db
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=${SA_PASSWORD}
- MSSQL_PID=Developer
ports:
- "1433:1433"
volumes:
- birthlist-mssql-data:/var/opt/mssql
networks:
- birthlist-network
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pidof sqlservr > /dev/null || exit 1"]
interval: 10s
timeout: 3s
retries: 10
start_period: 20s
networks:
birthlist-network:
driver: bridge
caddy-net:
external: true
volumes:
birthlist-mssql-data: