-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-prod.yml
51 lines (49 loc) · 1.8 KB
/
docker-compose-prod.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
---
services:
hbd:
# Optional build context
# build:
# context: .
# dockerfile: prod.Dockerfile
# Image from Docker Hub, ECR, etc
image: ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/hbd:latest
container_name: hbd
volumes:
- ./data:/app/data
restart: always
environment:
- DB_TYPE=sqlite
- DATABASE_URL=/app/data/hbd.db
- MASTER_KEY=${HBD_MASTER_KEY}
- PORT=8418
- ENVIRONMENT=production
- CUSTOM_DOMAIN=https://hbd.lotiguere.com
- GIN_MODE=release
# Optionally for backups of the birthday database to S3 or S3-compatible services
- HBD_ENABLE_BACKUP=true
- HBD_USER_ACCESS_KEY_ID=${HBD_USER_ACCESS_KEY_ID}
- HBD_USER_SECRET_ACCESS_KEY=${HBD_USER_SECRET_ACCESS_KEY}
- HBD_BUCKET_REGION=${HBD_BUCKET_REGION}
- HBD_BUCKET_NAME=${HBD_BUCKET_NAME}
# Optionally disable the frontend in case you want to directly interact with the API
- DISABLE_FRONTEND=false
labels:
# Frontend
- "traefik.enable=true"
- "traefik.http.routers.hbd.rule=Host(`hbd.lotiguere.com`)"
- "traefik.http.routers.hbd.entrypoints=websecure"
- "traefik.http.routers.hbd.tls.certresolver=myresolver"
- "traefik.http.routers.hbd.service=hbd-service"
- "traefik.http.services.hbd-service.loadbalancer.server.port=8418"
# Backend
- "traefik.http.routers.hbd-api.rule=Host(`hbd.lotiguere.com`) && PathPrefix(`/api`)"
- "traefik.http.routers.hbd-api.entrypoints=websecure"
- "traefik.http.routers.hbd-api.tls.certresolver=myresolver"
- "traefik.http.routers.hbd-api.service=hbd-api-service"
- "traefik.http.services.hbd-api-service.loadbalancer.server.port=8417"
networks:
- proxy
networks:
proxy:
name: proxy
external: true