-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (63 loc) · 1.8 KB
/
docker-compose.yml
File metadata and controls
64 lines (63 loc) · 1.8 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
63
64
version: '3.8'
services:
# ----------------------------------------------------------------------------------------------------
db:
image: mysql:8.0.23
platform: linux/x86_64
environment:
MYSQL_ROOT_PASSWORD: 'password'
TZ: 'Asia/Tokyo'
networks:
- default
ports:
# 自由に利用できるとされる動的・プライベート ポート番号は 49152–65535 らしいので、これらのうち5万番を利用する
# 以下、ウェルノウンポート番号 + 50000 という規約で設定していく
- '53306:3306'
command:
- --default-authentication-plugin=mysql_native_password
- --sql-mode=NO_ENGINE_SUBSTITUTION
# ----------------------------------------------------------------------------------------------------
app:
build:
context: .
dockerfile: Dockerfile.dev
volumes:
- .:/webapp:cached
links:
- db
- redis
env_file: .env
environment:
TZ: 'Asia/Tokyo'
networks:
- default
ports:
- '53000:3000'
command: bash -c 'rm -f tmp/pids/server.pid && rails s -b 0.0.0.0'
# ----------------------------------------------------------------------------------------------------
sidekiq_server:
build:
context: .
dockerfile: Dockerfile.dev
volumes:
- .:/webapp:cached
links:
- db
- redis
env_file: .env
environment:
TZ: 'Asia/Tokyo'
networks:
- default
command: bash -c "bundle exec sidekiq -C ./config/sidekiq.yml"
# ----------------------------------------------------------------------------------------------------
redis:
build:
context: ./docker/redis
privileged: true
command: sh -c "./init.sh"
networks:
- default
ports:
- 56379:6379
restart: always