-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
74 lines (74 loc) · 1.38 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
version: "3.8"
networks:
backend:
driver: "bridge"
services:
postgres:
image: postgres:13-alpine
command: ["postgres", "-c", "fsync=false", "-c", "full_page_writes=off"]
environment:
POSTGRES_PASSWORD: password
volumes:
- 'postgres:/var/lib/postgresql/data'
ports:
- "5432:5432"
networks:
- backend
redis:
image: redis:7.0.8-alpine
command: redis-server
ports:
- "6379:6379"
volumes:
- 'redis:/data'
networks:
- backend
sidekiq:
build:
context: .
dockerfile: app.Dockerfile
command: bundle exec sidekiq
environment:
RAILS_ENV: 'development'
REDIS_URL: 'redis://redis:6379/1'
depends_on:
- app
- postgres
- redis
volumes:
- .:/app
env_file:
- .env
networks:
- backend
app:
build:
context: .
dockerfile: app.Dockerfile
command: bash -c "bundle exec puma -C config/puma.rb"
stdin_open: true # docker run -i
tty: true # docker run -t
environment:
RAILS_ENV: development
volumes:
- .:/app
depends_on:
- postgres
- redis
env_file:
- .env
networks:
- backend
nginx:
build:
context: .
dockerfile: ./nginx.Dockerfile
depends_on:
- app
ports:
- 80:80
networks:
- backend
volumes:
redis:
postgres: