40 lines
929 B
YAML
40 lines
929 B
YAML
services:
|
|
postgres:
|
|
image: postgres:latest
|
|
environment:
|
|
POSTGRES_USER: sa
|
|
POSTGRES_PASSWORD: P@ssword123!
|
|
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: Development
|
|
ASPNETCORE_URLS: http://0.0.0.0:8080
|
|
ConnectionStrings__PostgresConnection: Host=postgres;Port=5432;Database=socialize;Username=sa;Password=P@ssword123!
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
expose:
|
|
- "8080"
|
|
|
|
web:
|
|
build:
|
|
context: .
|
|
dockerfile: frontend/Dockerfile
|
|
depends_on:
|
|
- api
|
|
ports:
|
|
- "8080:80"
|
|
volumes:
|
|
- ./deploy/caddy/Caddyfile:/etc/caddy/Caddyfile:ro
|