-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
66 lines (62 loc) · 1.44 KB
/
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
55
56
57
58
59
60
61
62
63
64
65
66
version: "3"
services:
database:
image: mysql:8.0.33
container_name: mysql
restart: always
environment:
MYSQL_ROOT_HOST: "%"
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: HelpNow
expose:
- 3306
volumes:
- mysql_data:/var/lib/mysql
networks:
- backend-database
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "--silent"]
interval: 3s
retries: 5
start_period: 30s
timeout: 15s
backend:
container_name: helpnow-backend
build:
context: ./backend
restart: always
environment:
MYSQL_DATABASE: HelpNow
# the access to database using internal docker network (service name as a host)
MYSQL_HOST: database
MYSQL_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MAIL_USERNAME: ${MAIL_USERNAME}
MAIL_PASSWORD: ${MAIL_PASSWORD}
expose:
- 8080
ports:
- 8080:8080
networks:
- frontend-backend
- backend-database
depends_on:
database:
condition: service_healthy
frontend:
container_name: helpnow-frontend
build:
context: ./frontend
restart: always
expose:
- 4200
ports:
- 4200:80
depends_on:
- backend
networks:
- frontend-backend
volumes:
mysql_data: {}
networks:
frontend-backend: {}
backend-database: {}