-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
77 lines (69 loc) · 1.58 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
75
76
77
version: '3.8'
x-environment:
&default-environment
- RAILS_ENV=development
x-env_file:
&default-env_file
- './.env'
services:
api:
build:
context: .
dockerfile: Dockerfile
environment: *default-environment
env_file: *default-env_file
depends_on:
- cache
- database
stdin_open: true
tty: true
volumes:
- .:/api
- ./config/database.docker.yml:/api/config/database.yml
- vol_api_bundle:/usr/local/bundle
- vol_api_log:/api/log
- vol_api_storage:/api/storage
- vol_api_tmp:/api/tmp
ports:
- '3000:3000'
command: >
bash -c 'rm -f tmp/pids/server.pid
&& touch tmp/caching-dev.txt
&& bundle exec puma -C config/puma.rb'
cache:
image: redis:6.0.8-alpine
command: 'redis-server'
tmpfs:
- /data
- /run
- /tmp
database:
image: postgres:13.0-alpine
env_file: *default-env_file
volumes:
- vol_database:/var/lib/postgresql/data
job_delay:
build:
context: .
dockerfile: Dockerfile
environment: *default-environment
env_file: *default-env_file
depends_on:
- cache
- database
stdin_open: true
tty: true
volumes:
- .:/api
- ./config/database.docker.yml:/api/config/database.yml
- vol_api_bundle:/usr/local/bundle
- vol_api_log:/api/log
- vol_api_storage:/api/storage
- vol_api_tmp:/api/tmp
command: ['bundle', 'exec', 'sidekiq', '-C', 'config/sidekiq.yml']
volumes:
vol_api_bundle:
vol_api_log:
vol_api_storage:
vol_api_tmp:
vol_database: