forked from luddwichr/fullstack-demo-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
39 lines (39 loc) · 911 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
services:
backend:
container_name: demo-backend
build: ./backend
networks:
- frontend_net
- backend_net
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://demo-db:5432/demo-database
- SPRING_DATASOURCE_USERNAME=postgres
- SPRING_DATASOURCE_PASSWORD=supersafe
frontend:
container_name: demo-frontend
build: ./frontend
networks:
frontend_net:
ports:
- 443:443
depends_on:
- backend
volumes:
- ./frontend/ssl/:/etc/nginx/certs/
db:
image: 'postgres:13-alpine'
container_name: demo-db
networks:
- backend_net
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
environment:
- POSTGRES_DB=demo-database
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=supersafe
networks:
frontend_net:
backend_net: