-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
118 lines (108 loc) · 2.31 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
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
version: '3.5'
services:
front:
container_name: front
build:
context: .
dockerfile: Dockerfile
volumes:
- './front:/usr/src/app'
- '/usr/src/app/node_modules'
labels:
- 'traefik.backend=front'
- 'traefik.port=3000'
- 'traefik.frontend.rule=Host:front.localhost'
ports:
- 3000
environment:
- NODE_ENV=development
- REACT_APP_BACK_URL=back.localhost
- REACT_APP_FRONT_URL=front.localhost
- CHOKIDAR_USEPOLLING=true
networks:
mc851:
aliases:
- front.localhost
back:
container_name: back
image: node:9
user: node
working_dir: /home/node
environment:
- NODE_ENV=development
- BACK_URL=back.localhost
- FRONT_URL=front.localhost
volumes:
- ./back:/home/node/
command: /home/node/run.sh
labels:
- 'traefik.backend=back'
- 'traefik.port=3001'
- 'traefik.frontend.rule=Host:back.localhost'
ports:
- 3001
depends_on:
- "db"
networks:
mc851:
aliases:
- back.localhost
db:
container_name: db
image: mariadb
volumes:
- .:/database/init_db.sql
environment:
MYSQL_ROOT_PASSWORD: P4ssword!
networks:
mc851:
aliases:
- db.localhost
flyway-repair:
image: boxfuse/flyway
command: repair
volumes:
- .:/flyway/sql
depends_on:
- db
networks:
mc851:
flyway:
image: boxfuse/flyway
command: -url=jdbc:mysql://db.localhost:3306 -schemas=ecommerce -user=root -password=P4ssword! migrate
volumes:
- .:/flyway/sql
depends_on:
- db
- flyway-repair
networks:
mc851:
pma:
image: phpmyadmin/phpmyadmin
depends_on:
- db
environment:
PMA_HOST: mariadb
PMA_ARBITRARY: 1
PHP_UPLOAD_MAX_FILESIZE: 1G
PHP_MAX_INPUT_VARS: 1G
labels:
- 'traefik.backend=pma'
- 'traefik.port=80'
- 'traefik.frontend.rule=Host:pma.localhost'
networks:
mc851:
traefik:
image: traefik
command: -c /dev/null --web --docker --logLevel=INFO
ports:
- '80:80'
- '8080:8080' # Dashboard
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
mc851:
networks:
mc851:
external:
name: mc851