-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
54 lines (50 loc) · 1.18 KB
/
docker-compose.prod.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:
postgres:
image: postgres:17.2
restart: unless-stopped
environment:
POSTGRES_USER: postgres # test credentials (see README)
POSTGRES_PASSWORD: postgres # test credentials (see README)
POSTGRES_DB: portfolio
logging:
options:
max-size: 10m
max-file: "3"
ports:
- '5432:5432'
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 10s
timeout: 5s
retries: 5
networks:
- backend
volumes:
- postgres_data:/var/lib/postgresql/data
backend:
image: simon861/portfolio-backend
restart: unless-stopped
depends_on:
- postgres
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/portfolio
SPRING_DATASOURCE_USERNAME: postgres # test credentials (see README)
SPRING_DATASOURCE_PASSWORD: postgres # test credentials (see README)
ports:
- '50002:8080'
networks:
- backend
frontend:
image: simon861/portfolio-frontend
restart: unless-stopped
ports:
- '50003:80'
depends_on:
- backend
networks:
- frontend
networks:
backend:
frontend:
volumes:
postgres_data: