-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.deploy.yml
More file actions
64 lines (60 loc) · 1.49 KB
/
docker-compose.deploy.yml
File metadata and controls
64 lines (60 loc) · 1.49 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
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DATABASE_USER}"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
redis:
image: redis:7-alpine
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
web:
image: ghcr.io/ashdevfr/experiment-rfhbx/backend:latest
env_file: .env.deploy
environment:
RAILS_ENV: production
DATABASE_HOST: db
DATABASE_PORT: 5432
REDIS_URL: redis://redis:6379/0
ports:
- "${PORT:-3000}:3000"
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
command: ["bin/rails", "server", "-b", "0.0.0.0"]
restart: unless-stopped
sidekiq:
image: ghcr.io/ashdevfr/experiment-rfhbx/backend:latest
env_file: .env.deploy
environment:
RAILS_ENV: production
DATABASE_HOST: db
DATABASE_PORT: 5432
REDIS_URL: redis://redis:6379/0
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
command: ["bundle", "exec", "sidekiq"]
restart: unless-stopped
volumes:
postgres_data:
redis_data: