-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
60 lines (59 loc) · 1.47 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
version: '3.7'
services:
postgres:
image: postgres:15-alpine
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- 'postgres:/var/lib/postgresql/data'
redis:
image: redis:7.0-alpine
volumes:
- 'redis:/data'
web:
depends_on:
- 'postgres'
- 'redis'
build:
context: .
dockerfile: Dockerfile.development
command: bash -c "rm -rf tmp/pids/server.pid && bundle exec rails s -p 3000 -b 0.0.0.0"
ports:
- '${DOCKER_HOST_WEB_PORT:-3000}:3000'
volumes:
- 'bundle_cache:/bundle'
- '.:/app'
environment:
REDIS_URL: redis://redis:6379/0
DB_HOST: postgres
DB_PORT: 5432
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
RAILS_MASTER_KEY: ${RAILS_MASTER_KEY}
DISABLE_SPRING: 1
worker:
depends_on:
- 'postgres'
- 'redis'
build:
context: .
dockerfile: Dockerfile.development
args:
RAILS_MASTER_KEY: ${RAILS_MASTER_KEY}
command: bundle exec sidekiq -C config/sidekiq.yml
volumes:
- 'bundle_cache:/bundle'
- '.:/app'
environment:
REDIS_URL: redis://redis:6379/0
DB_HOST: postgres
DB_PORT: 5432
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
RAILS_MASTER_KEY: ${RAILS_MASTER_KEY}
DISABLE_SPRING: 1
volumes:
redis:
postgres:
bundle_cache: