forked from paypay/FullStackEngineerChallenge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
62 lines (60 loc) · 1.15 KB
/
docker-compose.yml
File metadata and controls
62 lines (60 loc) · 1.15 KB
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
version: "3.8"
x-common-variables: &common-variables
MYSQL_USER: mysqluser
MYSQL_PASSWORD: mysqlpassword
MYSQL_DATABASE: mysqldb
REACT_APP_SERVER_PORT: 8000
services:
mysql:
image: mysql:5.7
environment:
<<: *common-variables
MYSQL_HOST: localhost
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
restart: unless-stopped
volumes:
- ./db/mysqldb.sql:/docker-entrypoint-initdb.d/mysqldb.sql
phpmyadmin:
depends_on:
- mysql
image: phpmyadmin/phpmyadmin
environment:
PMA_HOST: mysql
links:
- mysql:mysql
ports:
- 8080:80
restart: always
server:
build: ./server
depends_on:
- mysql
expose:
- 8000
environment:
<<: *common-variables
MYSQL_HOST_IP: mysql
ports:
- 8000:8000
volumes:
- ./server:/server
links:
- mysql
command: npm start
client:
build: ./client
environment:
<<: *common-variables
NODE_PATH: src
expose:
- 3000
ports:
- 3000:3000
volumes:
- ./client/src:/app/src
links:
- server
stdin_open: true
command: npm start