-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
46 lines (42 loc) · 971 Bytes
/
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
version: "3.8"
volumes:
db-data:
services:
frontend:
build:
context: ./frontend
args:
WORKDIR: ${WORKDIR}
command: yarn start
volumes:
- ./frontend:/${WORKDIR}
ports:
- "${FRONTEND_PORT}:${CONTAINER_PORT}"
stdin_open: true
depends_on:
- backend
backend:
build:
context: ./backend
args:
WORKDIR: ${WORKDIR}
command: ash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
environment:
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
API_DOMEIN: localhost:${FRONTEND_PORT}
volumes:
- ./backend:/${WORKDIR}
ports:
- "${BACKEND_PORT}:${CONTAINER_PORT}"
depends_on:
- db
db:
image: mysql
command: --default-authentication-plugin=mysql_native_password
volumes:
- "db-data:/var/lib/mysql"
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD}
TZ: Aisa/Tokyo
ports:
- "3306:3306"