-
Notifications
You must be signed in to change notification settings - Fork 47
/
docker-compose.yml
73 lines (64 loc) · 1.19 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
version: '3.7'
x-app: &app
build:
context: .
dockerfile: ./Dockerfile
args:
RUBY_VERSION: '2.6.5'
BUNDLER_VERSION: '2.2.4'
NODE_MAJOR: '10'
image: pivorak-web-app:0.0.1
tmpfs:
- /tmp
stdin_open: true
tty: true
volumes:
- .:/app:cached
- rails_cache:/app/tmp/cache
- bundle:/bundle
environment:
- REDIS_URL=redis://redis:6379
- DATABASE_URL=postgres://postgres:postgres@postgres:5432
networks:
- pivorak-network
depends_on:
- postgres
- redis
services:
runner:
<<: *app
command: /bin/bash
rails:
<<: *app
command: bundle exec rails server -b 0.0.0.0
ports:
- '3000:3000'
sidekiq:
<<: *app
command: bundle exec sidekiq -C config/sidekiq.yml
postgres:
image: postgres:9.5
environment:
POSTGRES_PASSWORD: postgres
volumes:
- postgres:/var/lib/postgresql/data
networks:
- pivorak-network
ports:
- 5432
redis:
image: redis:3.2-alpine
volumes:
- redis:/data
networks:
- pivorak-network
ports:
- 6379
networks:
pivorak-network:
name: pivorak-network
volumes:
rails_cache:
bundle:
redis:
postgres: