-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
54 lines (50 loc) · 969 Bytes
/
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
53
54
services:
db:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: notes
volumes:
- notes-app-data:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- mynetwork
healthcheck:
test: pg_isready -U postgres
interval: 5s
timeout: 3s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "8080:8080"
env_file:
- .env
depends_on:
db:
condition: service_healthy
networks:
- mynetwork
environment:
DB_URL: jdbc:postgresql://db:5432/notes
FRONTEND_URL: http://localhost:4200
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "4200:80"
networks:
- mynetwork
depends_on:
- backend
networks:
mynetwork:
driver: bridge
volumes:
notes-app-data: