-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
docker-compose.yml
98 lines (97 loc) · 2.22 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
92
93
94
95
96
97
98
version: '3.7'
x-environment:
&server-environment
- AWS_REGION=local
- AWS_ACCESS_KEY_ID=beep
- AWS_SECRET_KEY=boop
- ENABLE_ADS=0
- GOOGLE_CLIENT_ID
- GOOGLE_CLIENT_SECRET
- NODE_ENV=development
- PATREON_CLIENT_ID
- PATREON_CLIENT_SECRET
- QUEUES=discover_runner,highlight_cleanup,refresh_game,sync_user_follows,v4_races # also update docker-compose-production.yml
- RAILS_LOG_TO_STDOUT=true # Log to stdout so docker/docker-compose can take over logs
- RAILS_ENV
- RAILS_ROOT="/app"
- READ_ONLY_MODE=0
- REDIS_URL="redis/0"
- S3_BUCKET=splits-io
- SITE_TITLE=Splits.io (Local)
- SPLITSIO_CLIENT_ID
- SPLITSIO_CLIENT_SECRET
- TWITCH_CLIENT_ID
- TWITCH_CLIENT_SECRET
x-logging:
&default-logging
driver: json-file
options:
max-size: 1m
max-file: "1"
services:
db:
image: postgres
logging: *default-logging
volumes:
- ./db/init.sql:/docker-entrypoint-initdb.d/10-init.sql
s3:
expose:
- "4569"
image: lphoward/fake-s3
logging: *default-logging
ports:
- 4569:4569
webpacker:
build: .
command: bash -c "yarn install && ruby bin/webpack-dev-server"
environment:
- SPLITSIO_CLIENT_ID
expose:
- "3035"
image: webpacker
logging: *default-logging
ports:
- 3035:3035
volumes:
- .:/app
web:
build:
context: .
dockerfile: Dockerfile
command: bash -c "rm -f /app/tmp/pids/server.pid && bundle install && bundle exec rails db:migrate && bundle exec rails s -p 3000 -b '0.0.0.0'"
depends_on:
- db
- s3
- webpacker
- worker
- redis
environment: *server-environment
image: web
links:
- s3:s3.localhost
- webpacker:webpacker.localhost
logging: *default-logging
ports:
- 3000:3000
stdin_open: true
tty: true
volumes:
- ./:/app
worker:
build: .
command: bash -c "rm -f /app/tmp/pids/delayed*.pid && bundle exec rake jobs:work"
depends_on:
- db
- s3
- redis
environment: *server-environment
image: worker
links:
- s3:s3.localhost
logging: *default-logging
ports: []
stdin_open: true
tty: true
redis:
image: redis
logging: *default-logging