2026-03-03 14:07:29 +01:00
|
|
|
version: '3.9'
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
postgres:
|
|
|
|
|
image: postgres:16-alpine
|
|
|
|
|
container_name: workclub_postgres
|
|
|
|
|
environment:
|
|
|
|
|
POSTGRES_USER: postgres
|
|
|
|
|
POSTGRES_PASSWORD: postgres
|
|
|
|
|
POSTGRES_DB: postgres
|
2026-03-05 13:50:32 +01:00
|
|
|
POSTGRES_INITDB_ARGS: "-c default_transaction_isolation='read committed' -c max_connections=200"
|
2026-03-03 14:07:29 +01:00
|
|
|
ports:
|
|
|
|
|
- "5432:5432"
|
|
|
|
|
volumes:
|
|
|
|
|
- postgres-data:/var/lib/postgresql/data
|
|
|
|
|
- ./infra/postgres:/docker-entrypoint-initdb.d
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
|
|
|
interval: 10s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 5
|
|
|
|
|
start_period: 10s
|
|
|
|
|
networks:
|
|
|
|
|
- app-network
|
|
|
|
|
command: >
|
|
|
|
|
postgres
|
2026-03-05 13:50:32 +01:00
|
|
|
-c default_transaction_isolation='read committed'
|
2026-03-03 14:07:29 +01:00
|
|
|
-c max_connections=200
|
|
|
|
|
|
|
|
|
|
keycloak:
|
|
|
|
|
image: quay.io/keycloak/keycloak:26.1
|
|
|
|
|
container_name: workclub_keycloak
|
|
|
|
|
environment:
|
|
|
|
|
KEYCLOAK_ADMIN: admin
|
|
|
|
|
KEYCLOAK_ADMIN_PASSWORD: admin
|
|
|
|
|
KC_DB: postgres
|
|
|
|
|
KC_DB_URL: jdbc:postgresql://postgres:5432/keycloak
|
|
|
|
|
KC_DB_USERNAME: keycloak
|
|
|
|
|
KC_DB_PASSWORD: keycloakpass
|
|
|
|
|
KC_HEALTH_ENABLED: "true"
|
|
|
|
|
KC_LOG_LEVEL: INFO
|
|
|
|
|
ports:
|
|
|
|
|
- "8080:8080"
|
|
|
|
|
volumes:
|
|
|
|
|
- ./infra/keycloak:/opt/keycloak/data/import
|
|
|
|
|
depends_on:
|
|
|
|
|
postgres:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
networks:
|
|
|
|
|
- app-network
|
|
|
|
|
command: >
|
|
|
|
|
start-dev
|
|
|
|
|
--import-realm
|
|
|
|
|
|
2026-03-03 21:05:23 +01:00
|
|
|
dotnet-api:
|
|
|
|
|
build:
|
|
|
|
|
context: ./backend
|
|
|
|
|
dockerfile: Dockerfile.dev
|
|
|
|
|
container_name: workclub_api
|
|
|
|
|
environment:
|
|
|
|
|
ASPNETCORE_ENVIRONMENT: Development
|
2026-03-05 13:50:32 +01:00
|
|
|
ASPNETCORE_URLS: "http://+:8080"
|
2026-03-03 21:05:23 +01:00
|
|
|
ConnectionStrings__DefaultConnection: "Host=postgres;Port=5432;Database=workclub;Username=workclub;Password=dev_password_change_in_production"
|
|
|
|
|
Keycloak__Authority: "http://keycloak:8080/realms/workclub"
|
|
|
|
|
Keycloak__Audience: "workclub-api"
|
2026-03-05 14:12:53 +01:00
|
|
|
Keycloak__TokenValidationParameters__ValidateIssuer: "false"
|
2026-03-03 21:05:23 +01:00
|
|
|
ports:
|
2026-03-05 13:50:32 +01:00
|
|
|
- "5001:8080"
|
2026-03-03 21:05:23 +01:00
|
|
|
volumes:
|
|
|
|
|
- ./backend:/app:cached
|
|
|
|
|
depends_on:
|
|
|
|
|
postgres:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
networks:
|
|
|
|
|
- app-network
|
|
|
|
|
|
|
|
|
|
nextjs:
|
|
|
|
|
build:
|
|
|
|
|
context: ./frontend
|
|
|
|
|
dockerfile: Dockerfile.dev
|
|
|
|
|
container_name: workclub_frontend
|
2026-03-05 21:32:34 +01:00
|
|
|
extra_hosts:
|
|
|
|
|
- "localhost:host-gateway"
|
2026-03-03 21:05:23 +01:00
|
|
|
environment:
|
2026-03-05 13:50:32 +01:00
|
|
|
NEXT_PUBLIC_API_URL: "http://localhost:5001"
|
2026-03-03 21:05:23 +01:00
|
|
|
API_INTERNAL_URL: "http://dotnet-api:8080"
|
|
|
|
|
NEXTAUTH_URL: "http://localhost:3000"
|
|
|
|
|
NEXTAUTH_SECRET: "dev-secret-change-in-production-use-openssl-rand-base64-32"
|
2026-03-05 21:32:34 +01:00
|
|
|
KEYCLOAK_CLIENT_ID: "workclub-app"
|
2026-03-05 13:50:32 +01:00
|
|
|
KEYCLOAK_CLIENT_SECRET: "dev-secret-workclub-api-change-in-production"
|
2026-03-03 21:05:23 +01:00
|
|
|
KEYCLOAK_ISSUER: "http://localhost:8080/realms/workclub"
|
2026-03-09 14:21:03 +01:00
|
|
|
KEYCLOAK_ISSUER_INTERNAL: "http://keycloak:8080/realms/workclub"
|
|
|
|
|
NEXT_PUBLIC_KEYCLOAK_ISSUER: "http://localhost:8080/realms/workclub"
|
2026-03-03 21:05:23 +01:00
|
|
|
ports:
|
|
|
|
|
- "3000:3000"
|
|
|
|
|
volumes:
|
|
|
|
|
- ./frontend:/app:cached
|
|
|
|
|
- /app/node_modules
|
|
|
|
|
depends_on:
|
|
|
|
|
- dotnet-api
|
|
|
|
|
networks:
|
|
|
|
|
- app-network
|
|
|
|
|
|
2026-03-03 14:07:29 +01:00
|
|
|
volumes:
|
|
|
|
|
postgres-data:
|
|
|
|
|
driver: local
|
|
|
|
|
|
|
|
|
|
networks:
|
|
|
|
|
app-network:
|
|
|
|
|
driver: bridge
|