45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:latest
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER:-sa}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}
|
|
POSTGRES_DB: ${POSTGRES_DB:-socialize}
|
|
ports:
|
|
- "5433:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U sa -d socialize"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
|
|
api:
|
|
build:
|
|
context: .
|
|
dockerfile: backend/src/Socialize.Api/Dockerfile
|
|
environment:
|
|
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT:-Development}
|
|
ASPNETCORE_URLS: http://0.0.0.0:8080
|
|
ConnectionStrings__PostgresConnection: Host=postgres;Port=5432;Database=${POSTGRES_DB:-socialize};Username=${POSTGRES_USER:-sa};Password=${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
expose:
|
|
- "8080"
|
|
volumes:
|
|
- api-blob-storage:/app/App_Data/blob-storage
|
|
|
|
web:
|
|
build:
|
|
context: .
|
|
dockerfile: frontend/Dockerfile
|
|
depends_on:
|
|
- api
|
|
ports:
|
|
- "8080:80"
|
|
volumes:
|
|
- ./deploy/caddy/Caddyfile:/etc/caddy/Caddyfile:ro
|
|
|
|
volumes:
|
|
api-blob-storage:
|