-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
40 lines (38 loc) · 1.35 KB
/
docker-compose.prod.yml
File metadata and controls
40 lines (38 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
services:
aspnet_app:
build:
context: ./backend
dockerfile: Dockerfile.prod
environment:
ASPNETCORE_ENVIRONMENT: Production
ASPNETCORE_URLS: http://+:5171
ConnectionStrings__DbConnection: "Host=postgres_db;Port=5432;Database=${GIRAF_DB_NAME:-giraf_prod};Username=${GIRAF_DB_USER:-postgres};Password=${GIRAF_DB_PASSWORD:?GIRAF_DB_PASSWORD is required}"
JwtSettings__SecretKey: "${GIRAF_JWT_SECRET:?GIRAF_JWT_SECRET is required (min 32 chars)}"
JwtSettings__Issuer: "${GIRAF_JWT_ISSUER:-Giraf}"
JwtSettings__Audience: "${GIRAF_JWT_AUDIENCE:-GirafApp}"
GirafCore__BaseUrl: "${GIRAF_CORE_URL:?GIRAF_CORE_URL is required}"
ports:
- "${GIRAF_API_PORT:-5171}:5171"
depends_on:
postgres_db:
condition: service_healthy
restart: unless-stopped
postgres_db:
image: postgres:15
container_name: weekplanner_db
environment:
POSTGRES_USER: ${GIRAF_DB_USER:-postgres}
POSTGRES_PASSWORD: ${GIRAF_DB_PASSWORD:?GIRAF_DB_PASSWORD is required}
POSTGRES_DB: ${GIRAF_DB_NAME:-giraf_prod}
ports:
- "${GIRAF_DB_PORT:-5432}:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${GIRAF_DB_USER:-postgres}"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
pgdata: