-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
91 lines (90 loc) · 2.24 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
90
91
version: '3'
services:
db:
container_name: issues_db
image: postgres:14.6
environment:
TZ: Asia/Tokyo
POSTGRES_USER: issues_app
POSTGRES_PASSWORD: issues_app
volumes:
- db_volume:/var/lib/postgresql/data
ports:
- 5432:5432
restart: always
web: &web
container_name: issues_web
build: .
command: bash -c "service cron start && bundle exec whenever --update-crontab && rm -rf tmp/pids/server.pid && rails db:create db:migrate && rails s -p 3000 -b '0.0.0.0'"
environment:
RAILS_ENV: development
NODE_ENV: development
ISSUES_APP_DATABASE_PASSWORD: issues_app
WEBPACKER_DEV_SERVER_HOST: webpacker
MINIO_ROOT_USER: issues_app
MINIO_ROOT_PASSWORD: issues_app
volumes:
- .:/app
ports:
- 3000:3000
restart: always
depends_on:
- db
- minio
- redis
tty: true
stdin_open: true
webpacker:
<<: *web
container_name: issues_webpacker
depends_on:
- web
- minio
command: bash -c "./bin/webpack-dev-server"
environment:
WEBPACKER_DEV_SERVER_HOST: 0.0.0.0
volumes:
- .:/app
ports:
- 3035:3035
minio:
container_name: issues_minio
image: minio/minio:latest
environment:
MINIO_ROOT_USER: issues_app
MINIO_ROOT_PASSWORD: issues_app
entrypoint: bash
command: -c "/opt/bin/minio server /data --console-address :9001"
volumes:
- minio_volume:/data
ports:
- 9000:9000
- 9001:9001
mc:
container_name: mc
image: minio/mc:latest
depends_on:
- minio
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host rm local;
/usr/bin/mc config host add --quiet --api s3v4 local http://minio:9000 issues_app issues_app;
/usr/bin/mc mb --quiet local/issues-app-development;
/usr/bin/mc policy set public local/issues-app-development;
/usr/bin/mc mb --quiet local/issues-app-test;
/usr/bin/mc policy set public local/issues-app-test;
"
redis:
container_name: issues_redis
image: redis
ports:
- 6379:6379
volumes:
- redis_volume:/data
volumes:
db_volume:
driver: local
minio_volume:
driver: local
redis_volume:
driver: local