vbytes-lan-registration/docker-compose.yml
2026-09-13 13:47:34 +02:00

75 lines
2.3 KiB
YAML

services:
# PostgreSQL Database
postgres:
image: postgres:17-alpine
restart: always
container_name: local-postgres
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: postgres
volumes:
- postgres_data:/var/lib/postgresql/data
# Auth API - Internal member validation service
auth-api:
build:
context: ./src/Auth
dockerfile: ./AuthAPI/Dockerfile
container_name: auth-api
restart: unless-stopped
# No ports exposed externally
environment:
- ASPNETCORE_ENVIRONMENT=Production
# These should be replaced with real values or set in an .env file
- EnvironmentVariables__ApiUrl="https://ebas.sverok.se/apis/confirm_membership.json"
- EnvironmentVariables__ApiKey="stHvwoptoHxobOaXKQOyyNbqrv0EJQLx"
- EnvironmentVariables__AssociationNumber="F200833-2"
depends_on:
- postgres
# Registration API - Core backend service
registration-api:
build:
context: ./src/Registration
dockerfile: ./Registration.API/Dockerfile
container_name: registration-api
restart: unless-stopped
# No ports exposed externally
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ConnectionStrings__DefaultConnection=Host=postgres;Username=postgres;Password=postgres;Database=postgres;Port=5432
- AuthApi__BaseUrl=http://auth-api:8080
- VbytesRelay__BaseUrl=https://api.lan.vbytes.se
- VbytesRelay__ApiKey=${VBYTES_RELAY_API_KEY}
- VbytesRelay__ClientCertificatePfxPath=/app/certs/server.pfx
- Security__SsnPepper=${SSN_PEPPER}
- VbytesRelay__VolunteerRegisterPath=/api/volunteer
- VbytesRelay__ParticipantRegisterPath=/api/participant
- Admin__Password=admin
volumes:
- ./server.pfx:/app/certs/server.pfx:ro,z
depends_on:
- postgres
- auth-api
# Web Frontend - User interface
lan-frontend:
build:
context: ./src/Web/lan-frontend
dockerfile: Dockerfile
args:
- REGISTRATION_API_URL=http://registration-api:8080
container_name: lan-frontend
restart: always
ports:
- "5000:3000"
environment:
- REGISTRATION_API_URL=http://registration-api:8080
depends_on:
- registration-api
volumes:
postgres_data: