-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
41 lines (38 loc) · 1.08 KB
/
Copy pathcompose.yaml
File metadata and controls
41 lines (38 loc) · 1.08 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
41
services:
app:
build:
context: ./src
dockerfile: Truman.Api/Dockerfile
image: truman-app:local
depends_on:
postgres:
condition: service_healthy
env_file:
- .env
environment:
POSTGRES_HOST: postgres
# .NET falls back to "Production" when this is unset, so local containers have to say
# Development explicitly. launchSettings.json does not apply to `docker compose up`.
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT:-Development}
Frontend__BaseUrl: ${Frontend__BaseUrl:-http://localhost:5001}
PORT: 5001
ports:
- "5001:5001"
postgres:
image: postgres:16
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "5432:5432"
volumes:
- truman-postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
volumes:
truman-postgres-data: