-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathdocker-compose.yml
72 lines (64 loc) · 1.52 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
x-ruby: &ruby
build:
context: .
args:
RUBY_VERSION: 2.6.6
GEM_VERSION: 3.3.22
BUNDLER_VERSION: 2.4.22
image: ruby:2.6.6-idiario
pull_policy: never
platform: linux/amd64
volumes:
- .:/app
- box:/box
depends_on:
postgres:
condition: service_started
redis:
condition: service_started
ruby:
condition: service_completed_successfully
environment:
DATABASE_HOST: postgres
REDIS_URL: redis://idiario-redis
services:
ruby:
<<: *ruby
container_name: idiario-ruby
command: ./script/start
depends_on: []
puma:
<<: *ruby
container_name: idiario-puma
command: bundle exec rails server -b 0.0.0.0
ports:
- ${DOCKER_APP_PORT:-80}:80
- ${DOCKER_APP_SSL_PORT:-443}:443
sidekiq:
<<: *ruby
container_name: idiario-sidekiq
command: bundle exec sidekiq -c 10 --logfile log/sidekiq.log
restart: always
sidekiq-enqueue:
<<: *ruby
container_name: idiario-sidekiq-enqueue
command: bundle exec sidekiq -q synchronizer_enqueue_next_job -c 1 --logfile log/sidekiq.log
restart: always
postgres:
container_name: idiario-postgres
image: postgres:16-alpine
volumes:
- postgres:/var/lib/postgresql/data
environment:
POSTGRES_DB: idiario_development
POSTGRES_PASSWORD: postgres
ports:
- ${DOCKER_POSTGRES_PORT:-5432}:5432
redis:
container_name: idiario-redis
image: redis:7-alpine
ports:
- ${DOCKER_REDIS_PORT:-6379}:6379
volumes:
box:
postgres: