-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.nas.yml
51 lines (47 loc) · 1.22 KB
/
docker-compose.nas.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
services:
nginx:
image: nginx:latest
container_name: nginx-proxy
restart: always
ports:
- "3050:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- backend
- frontend
frontend:
container_name: frontend
image: pdelebarre/guitar-tutorial-app-frontend
backend:
container_name: backend
image: pdelebarre/guitar-tutorial-app-backend
environment:
TUTORIALS_PATH: /app/tutorials
SPRING_PROFILES_ACTIVE: prod
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/guitardb
SPRING_DATASOURCE_USERNAME: myuser
SPRING_DATASOURCE_PASSWORD: mypassword
volumes:
- /volume1/docker/guitar-tutorial/tutorials:/app/tutorials
depends_on:
- postgres
restart: unless-stopped
postgres:
image: postgres:17-alpine
container_name: postgres
environment:
POSTGRES_USER: myuser
POSTGRES_PASSWORD: mypassword
POSTGRES_DB: guitardb
ports:
- "5433:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U myuser -d guitardb"]
interval: 10s
retries: 5
start_period: 5s
volumes:
postgres_data: