thecr3w-dev/docker-compose.yml
2026-10-31 16:38:36 +01:00

91 lines
2.7 KiB
YAML

version: '3.8'
networks:
proxy:
external: true
thecr3w_internal:
driver: bridge
internal: true
volumes:
thecr3w_postgres_data:
driver: local
services:
thecr3w-postgres:
image: postgres:16-alpine
container_name: thecr3w-postgres
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-thecr3w_db}
POSTGRES_USER: ${POSTGRES_USER:-thecr3w_user}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Brak hasla bazy w .env}
volumes:
- thecr3w_postgres_data:/var/lib/postgresql/data
- ./infrastructure/postgres/init:/docker-entrypoint-initdb.d:ro
networks:
- thecr3w_internal
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-thecr3w_user} -d ${POSTGRES_DB:-thecr3w_db}"]
interval: 10s
timeout: 5s
retries: 5
thecr3w-backend:
build:
context: .
dockerfile: infrastructure/docker/Dockerfile.backend
container_name: thecr3w-backend
restart: unless-stopped
depends_on:
thecr3w-postgres:
condition: service_healthy
environment:
ASPNETCORE_ENVIRONMENT: Production
ConnectionStrings__DefaultConnection: Host=thecr3w-postgres;Port=5432;Database=${POSTGRES_DB:-thecr3w_db};Username=${POSTGRES_USER:-thecr3w_user};Password=${POSTGRES_PASSWORD}
Keycloak__Authority: ${KEYCLOAK_AUTHORITY:-https://login.thecr3wnet.com/realms/master}
Keycloak__Audience: ${KEYCLOAK_AUDIENCE:-thecr3w-backend}
R2__Endpoint: ${R2_ENDPOINT:-https://bf705752e38169fedb83efd5b747390e.r2.cloudflarestorage.com}
R2__Bucket: ${R2_BUCKET:-thecr3w-app}
R2__Region: ${R2_REGION:-auto}
R2__AccessKeyId: ${R2_ACCESS_KEY_ID:-}
R2__SecretAccessKey: ${R2_SECRET_ACCESS_KEY:-}
Signing__Ed25519PrivateKeyHex: ${ED25519_PRIVATE_KEY_HEX:-}
Signing__Ed25519PublicKeyHex: ${ED25519_PUBLIC_KEY_HEX:-}
networks:
- proxy
- thecr3w_internal
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:5000/health || exit 1"]
interval: 10s
timeout: 5s
retries: 3
thecr3w-download-center:
build:
context: .
dockerfile: infrastructure/docker/Dockerfile.download-center
container_name: thecr3w-download-center
restart: unless-stopped
networks:
- proxy
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:80/ || exit 1"]
interval: 10s
timeout: 3s
retries: 3
thecr3w-admin-panel:
build:
context: .
dockerfile: infrastructure/docker/Dockerfile.admin-panel
container_name: thecr3w-admin-panel
restart: unless-stopped
networks:
- proxy
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:80/ || exit 1"]
interval: 10s
timeout: 3s
retries: 3