-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
48 lines (45 loc) · 1.18 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
version: '2'
services:
db:
env_file: .env
image: postgres:14.7
volumes:
- postgres_data:/var/lib/postgresql/data
redis:
env_file: .env
image: 'redis:6.2-alpine'
command: redis-server --requirepass ${REDIS_PASSWORD}
volumes:
- redis_data:/var/lib/redis/data
sidekiq:
env_file: .env
image: ghcr.io/csvalpha/amber-api:latest
command: sidekiq -C config/sidekiq.yml
depends_on:
- db
- redis
environment:
- RAILS_ENV=production
- REDIS_HOST=redis
- POSTGRES_HOST=db
web:
env_file: .env
image: ghcr.io/csvalpha/amber-api:latest
depends_on:
- db
- redis
environment:
- RAILS_ENV=production
- REDIS_HOST=redis
- POSTGRES_HOST=db
volumes:
- ./public/uploads:/app/public/uploads
- ./log:/app/log
labels:
- traefik.enable=true
- traefik.http.routers.amber-api-staging.rule=Host(`$HOST`) && PathPrefix(`/api`, `/uploads`, `/sidekiq`, `/webdav`, `/ical`)
- traefik.http.routers.amber-api-staging.middlewares=amber-api-strip@file
- traefik.http.routers.amber-api-staging.tls.certresolver=default
volumes:
postgres_data:
redis_data: