-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
52 lines (48 loc) · 1.08 KB
/
docker-compose.yml
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
42
43
44
45
46
47
48
49
50
51
52
services:
backend:
build:
context: ./Backend
dockerfile: Dockerfile
args:
ASPNETCORE_ENVIRONMENT: Development
CONNECTION_STRING: ${CONNECTION_STRING}
environment:
- ASPNETCORE_ENVIRONMENT=Development
- CONNECTION_STRING=${CONNECTION_STRING}
depends_on:
postgres:
condition: service_healthy
networks:
- app-network
frontend:
build:
context: ./Frontend
dockerfile: Dockerfile
environment:
- VITE_API_URL=${VITE_API_URL}
ports:
- "80:80"
depends_on:
- backend
networks:
- app-network
postgres:
image: postgres:16
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "pg_isready -d ${POSTGRES_DB} -U ${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- app-network
networks:
app-network:
driver: bridge
volumes:
postgres-data: