-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
58 lines (52 loc) · 1.08 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
version: "3.9"
services:
exprest:
image: node:12-alpine
command: sh -c "yarn install && node src/index.js"
ports:
- ${EXP_PORT}:${EXP_PORT}
working_dir: /app
volumes:
- ./exp:/app
environment:
MYSQL_HOST: "${MYSQL_HOST}"
MYSQL_USER: "${MYSQL_USER}"
MYSQL_PASSWORD: "${MYSQL_PASS}"
MYSQL_DB: "${MYSQL_DB}"
EXP_PORT: ${EXP_PORT}
TEST_ENV_VAR: "${TEST_VAR}"
depends_on:
- mysql
networks:
- back-net
mysql:
image: mysql:5.7
volumes:
- mysql-test-vol:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: "${MYSQL_PASS}"
MYSQL_DATABASE: "${MYSQL_DB}"
networks:
- back-net
front-end:
image: node:12-alpine
command: sh -c "yarn install && yarn start"
ports:
- 80:3000
working_dir: /app
volumes:
- ./po-front:/app
environment:
EXP_PORT: ${EXP_PORT}
networks:
- front-net
depends_on:
- exprest
networks:
front-net:
driver: bridge
back-net:
driver: bridge
volumes:
mysql-test-vol:
external: true