-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
85 lines (80 loc) · 1.79 KB
/
compose.yml
File metadata and controls
85 lines (80 loc) · 1.79 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
version: '3.8'
services:
postgres_database:
image: postgres:latest
container_name: postgres_container
env_file:
- .env
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
restart: 'unless-stopped'
ports:
- '1234:5432'
volumes:
- ./pg_data:/var/lib/postgresql/data
networks:
- fullstack
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U ${DB_USER} -d ${DB_NAME}'"]
timeout: 5s
interval: 5s
retries: 5
start_period: 10s
reception_service:
container_name: reception_service_container
build:
context: ./backend
dockerfile: DockerfileReception
environment:
- DB_HOST=postgres_database
- DB_PORT=5432
restart: 'unless-stopped'
depends_on:
postgres_database:
condition: service_healthy
networks:
- fullstack
volumes:
- ./.env:/app/.env
rest_api:
container_name: rest_api_container
build:
context: ./backend
dockerfile: DockerfileRest
environment:
- DB_HOST=postgres_database
- DB_PORT=5432
restart: 'unless-stopped'
ports:
- '8080:8080'
depends_on:
postgres_database:
condition: service_healthy
networks:
- fullstack
volumes:
- ./.env:/app/.env
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/" ]
interval: 10s
timeout: 10s
retries: 3
start_period: 10s
frontend:
container_name: frontend_container
build: ./frontend/
restart: 'unless-stopped'
ports:
- '80:3000'
depends_on:
rest_api:
condition: service_healthy
networks:
- fullstack
volumes:
pg_data:
networks:
fullstack:
driver: bridge