-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
89 lines (82 loc) · 1.87 KB
/
compose.yaml
File metadata and controls
89 lines (82 loc) · 1.87 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
name: initapp
x-app: &app
image: initapp
build:
context: .
target: development
environment:
REDIS_URL: redis://redis:6379/0
RAILS_ENV: development
RACK_ENV: development
DATABASE_URL: postgres://postgres:postgres@postgres:5432
RAILS_LOG_TO_STDOUT: true
SECRET_KEY_BASE: secret
JWT_SECRET_KEY: secret
HISTFILE: /data/.bash_history
IRB_HISTORY_FILE: tmp/.irb_history
MAILCATCHER_HOST: mailcatcher
env_file:
- .env
volumes:
- ./:/app:c
- cache:/app/tmp/cache:d
- bundle:/usr/local/bundle:d
- node_modules:/app/node_modules:d
- data:/data:d
stdin_open: true
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
services:
app:
<<: *app
ports:
- ${PORT:-3000}:${PORT:-3000}
healthcheck:
test: ["CMD", "curl", "http://app:3000/health"]
interval: 20s
timeout: 5s
retries: 3
start_period: 20s
command: bin/dev --auto-deps-install --auto-migrate
sidekiq:
<<: *app
command: bundle exec sidekiq -C config/sidekiq.yml
redis:
image: redis:7.4.2
volumes:
- redis:/data:delegated
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 1s
timeout: 3s
retries: 30
entrypoint: redis-server --appendonly yes
restart: always
postgres:
image: postgres:16.8-bookworm
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_HOST: 0.0.0.0
volumes:
- postgres:/var/lib/postgresql/data:c
healthcheck:
test: ["CMD-SHELL", "pg_isready -h postgres -U postgres"]
interval: 10s
timeout: 5s
retries: 5
mailcatcher:
image: dockage/mailcatcher
restart: on-failure:10
ports:
- ${MAILCATCHER_PORT:-1080}:1080
volumes:
postgres:
redis:
bundle:
node_modules:
data:
cache: