-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
36 lines (35 loc) · 820 Bytes
/
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
version: '3'
services:
web:
build: .
ports:
- "3000:3000"
dns: "8.8.8.8"
volumes:
- ".:/app"
env_file: .env
links:
- db:db
- redis:redis
# In production instead add external_links for db
command: bash -c "bundle exec rake assets:precompile && bundle exec rake db:create && bundle exec rake db:migrate && bundle exec rails s"
worker:
build: .
env_file: .env
links:
- db:db
- redis:redis
volumes:
- ".:/app"
command: bash -c "bundle exec sidekiq -q default -q mailers"
# In production remove this and add an external link in web
db:
image: postgres:latest
environment:
- POSTGRES_PASSWORD=password
volumes:
- ./database:/var/lib/postgresql
redis:
image: redis:latest
volumes:
data: {}