-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
59 lines (54 loc) · 1.2 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
version: '3.5'
services:
db_api:
image: mysql:5
volumes:
- coc_api_dbdata:/var/lib/mysql
- ./seed.sh:/usr/local/bin/seed.sh
ports:
- 3306:3306
networks:
- coc_network
environment:
MYSQL_ROOT_PASSWORD: clockofchangepw
MYSQL_DATABASE: clock_of_change
MYSQL_USER: coc
MYSQL_PASSWORD: 123456
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
mailhog:
container_name: mailhog
image: mailhog/mailhog
ports:
- 1025:1025
- 8025:8025
networks:
- coc_network
coc-api:
image: clock-of-change-api
build:
context: .
volumes:
- .:/home/node/coc-api
- /home/node/coc-api/node_modules
ports:
- 1337:1337
networks:
- coc_network
environment:
- MYSQL_HOST=db_api
- MYSQL_DB=clock_of_change
- MYSQL_USER=coc
- MYSQL_PASS=123456
- MAIL_HOST=mailhog
- MAIL_PORT=1025
- MAIL_USER=mailer
- MAIL_PASS=123456
depends_on:
- db_api
- mailhog
command: bash -c "wait-on tcp:db_api:3306 && db-migrate up && npm run start"
volumes:
coc_api_dbdata:
networks:
coc_network:
name: coc_network