-
Notifications
You must be signed in to change notification settings - Fork 22
/
docker-compose.yml
89 lines (81 loc) · 1.77 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
version: '3.9'
services:
db:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
MYSQL_DATABASE: "${DB_NAME}"
MYSQL_USER: "${DB_USERNAME}"
MYSQL_PASSWORD: "${DB_PASSWORD}"
restart: on-failure
healthcheck:
test: "mysql -uroot -p$DB_ROOT_PASSWORD -e 'select 1;'"
interval: 1s
retries: 20
volumes:
- database_invoice_dev:/var/lib/mysql
networks:
- invoice_dev
phpmyadmin:
image: phpmyadmin
ports:
- 8070:80
environment:
PMA_HOST: db
PMA_USER: "${DB_USERNAME}"
PMA_PASSWORD: "${DB_PASSWORD}"
networks:
- invoice_dev
server:
build:
context: ./server/
dockerfile: .docker/Dockerfile.dev
environment:
NODE_ENV: development
DB_HOST: 'db'
volumes:
- $PWD/server:/app
# Don't want to use the `node_modules` from the working tree,
# but the one which has been created in the container, due to
# `npm i`.
- /app/node_modules
# command: npm run dev:debug
command: npm run dev
ports:
- "3000:3000"
- "9229:9229"
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
networks:
- invoice_dev
redis:
image: redis:6.2
networks:
- invoice_dev
healthcheck:
test: "redis-cli ping"
interval: 1s
retries: 20
client:
build:
context: ./client
dockerfile: .docker/Dockerfile.dev
environment:
NODE_ENV: development
volumes:
- $PWD/client:/app
- /app/node_modules
ports:
- "8080:8080"
command: npm run serve
depends_on:
- server
networks:
- invoice_dev
volumes:
database_invoice_dev:
networks:
invoice_dev: