-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
36 lines (34 loc) · 1.08 KB
/
Copy pathdocker-compose.yml
File metadata and controls
36 lines (34 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
services:
developerstore.api:
container_name: developerstore_api
build:
context: .
dockerfile: ./Dockerfile
environment:
ASPNETCORE_ENVIRONMENT: Development
ASPNETCORE_HTTP_PORTS: 8080
Database__ApplyMigrationsOnStartup: "true"
ConnectionStrings__DefaultConnection: Host=developerstore.db;Port=5432;Database=${POSTGRES_DB};Username=${POSTGRES_USER};Password=${POSTGRES_PASSWORD}
depends_on:
developerstore.db:
condition: service_healthy
ports:
- "8080:8080"
developerstore.db:
container_name: developerstore_db
image: postgres:16-alpine
environment:
POSTGRES_DB: ${POSTGRES_DB:-developerstore}
POSTGRES_USER: ${POSTGRES_USER:-developerstore_app}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-developerstore_local_only}
ports:
- "5432:5432"
volumes:
- developerstore_postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $$POSTGRES_DB -U $$POSTGRES_USER"]
interval: 10s
timeout: 5s
retries: 10
volumes:
developerstore_postgres: