-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
90 lines (84 loc) · 1.91 KB
/
compose.yaml
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
90
name: Initapp-rails
services:
app:
image: initapp-rails
build:
context: .
target: development
env_file:
- .docker.env
- .env
stdin_open: true
ports:
- ${PORT:-3000}:${PORT:-3000}
tmpfs:
- /app/tmp/pids
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- ./:/app:c
- cache:/app/tmp/cache:d
- bundle:/usr/local/bundle:d
- node_modules:/app/node_modules:d
- data:/data:d
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:
image: initapp-rails
env_file: .docker.env
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
volumes:
- ./:/app:c
- cache:/app/tmp/cache:d
- bundle:/usr/local/bundle:d
- data:/data:d
command: bundle exec sidekiq -C config/sidekiq.yml
redis:
image: redis:7.4.0
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.4-bullseye
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
# container_name: initapp-mailcatcher
# restart: on-failure:10
# ports:
# - ${MAILCATCHER_PORT:-1080}:1080
volumes:
postgres:
redis:
bundle:
node_modules:
data:
cache: