-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
59 lines (55 loc) · 1.23 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
services:
seeds_db:
image: mysql:8.0
container_name: "seeds_db"
environment:
MYSQL_ROOT_PASSWORD: password
ports:
- "3306:3306"
command: --default-authentication-plugin=mysql_native_password
volumes:
- mysql-data:/var/lib/mysql
seeds_api:
build: ./api
container_name: "seeds_api"
ports:
- "3000:3000"
command: /bin/sh -c "rm -f tmp/pids/server.pid && rails server -b 0.0.0.0"
volumes:
- ./api:/myapp
depends_on:
- seeds_db
stdin_open: true
tty: true
environment:
DB_HOST: seeds_db
DB_USER: root
DB_PASSWORD: password
DB_NAME: myapp_development
seeds_view:
build: ./view
container_name: "seeds_view"
ports:
- "8080:8080"
command: sh -c "npm install && npm run dev"
volumes:
- ./view:/app
stdin_open: true
tty: true
environment:
- SEEDS_API_URI=http://localhost:3000
- WATCHPACK_POLLING=true
# 定期実行用コンテナ
cron:
image: nutmeg-seeds-seeds_api:latest
command: >
sh -c "whenever --update-cron &&
cron -f -l 2"
restart: always
volumes:
- ./api:/usr/src/app
depends_on:
- seeds_api
volumes:
mysql-data:
driver: local