-
Notifications
You must be signed in to change notification settings - Fork 20
/
docker-compose.yml
48 lines (44 loc) · 915 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
37
38
39
40
41
42
43
44
45
46
47
48
version: '3'
services:
db:
ports:
- "5432:5432"
volumes:
- ./tmp/db:/var/run/postgresql
environment:
POSTGRES_HOST_AUTH_METHOD: "trust"
image: postgres:latest
sidekiq:
build: .
command: 'bundle exec sidekiq'
volumes:
- .:/app
environment:
RAILS_ENV: "docker_development"
REDIS_URL: "redis://redis:6379/12"
depends_on:
- redis
redis:
container_name: redis
ports:
- "6379:6379"
links:
- db
image: redis:5.0-rc
web:
container_name: web
build: .
ports:
- "3000:3000"
command: /bin/sh -c "rails s -b 0.0.0.0 -p 3000"
volumes:
- .:/app
depends_on:
- db
- redis
- sidekiq
# Environment variables that allow my app to find other services
environment:
REDISTOGO_URL: "redis://redis:6379"
POSTGRES_USER: postgres
POSTGRES_HOST: db