-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
docker-compose.yml
117 lines (115 loc) · 2.82 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
version: '3.7'
x-server-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,race_cleanup,refresh_game,sync_user_follows,v4_races,parse_run,cleanup_runs # 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_SECRET
- SPLITSIO_CLIENT_ID
- STRIPE_PLAN_ID_TIER1=plan_FmRDE979W782Zj
- STRIPE_PLAN_ID_TIER2=plan_FmRDa9Hhf1lwMQ
- STRIPE_PUBLISHABLE_KEY=pk_test_8XH713ExTipOnBebjfsHHffm
- STRIPE_SECRET_KEY
- STRIPE_WEBHOOK_SECRET
- TWITCH_CLIENT_ID
- TWITCH_CLIENT_SECRET
x-client-environment:
&client-environment
- SPLITSIO_CLIENT_ID
- STRIPE_PUBLISHABLE_KEY=pk_test_8XH713ExTipOnBebjfsHHffm
x-logging:
&default-logging
driver: json-file
options:
max-size: 1m
max-file: "1"
x-app: &app
build:
context: .
dockerfile: Dockerfile
cache_from:
- "${REPOSITORY_URI:-splitsio-dev}:latest"
args:
RUBY_VERSION: '2.6.3' # also update docker-compose-production.yml & Gemfile
image: splitsio-dev
tmpfs:
- /tmp
x-backend: &backend
<<: *app
stdin_open: true
tty: true
volumes:
- .:/app
- ./bundle:/bundle
- ./node_modules:/app/node_modules
- packs:/app/public/packs
- rails_cache:/app/tmp/cache
links:
- s3:s3.localhost
depends_on:
- db
- s3
- redis
services:
db:
image: postgres:11.5-alpine
logging: *default-logging
volumes:
- ./db/init.sql:/docker-entrypoint-initdb.d/10-init.sql
- db:/var/lib/postgresql/data
s3:
image: lphoward/fake-s3
logging: *default-logging
ports:
- 4569:4569
volumes:
- s3:/fakes3_root
webpacker:
<<: *app
command: bash -c "ruby bin/webpack-dev-server"
environment: *client-environment
logging: *default-logging
ports:
- 3035:3035
volumes:
- .:/app
- ./bundle:/bundle
- packs:/app/public/packs
- rails_cache:/app/tmp/cache
web:
<<: *backend
command: bash -c "rm -f /app/tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
environment: *server-environment
logging: *default-logging
ports:
- 3000:3000
worker:
<<: *backend
command: bash -c "rm -f /app/tmp/pids/delayed*.pid && bundle exec rake jobs:work"
environment: *server-environment
logging: *default-logging
redis:
image: redis:5.0.5-alpine
logging: *default-logging
volumes:
- redis:/data
volumes:
db:
packs:
rails_cache:
redis:
s3: