-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
67 lines (66 loc) · 2.11 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
services:
coding-global-db:
container_name: coding-global-db
image: postgres:latest
restart: always
volumes:
- ~/duplicati-volume/source/coding-global-db-pgbackup:/backups
networks:
- proxy
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
labels:
- "traefik.enable=true"
- "traefik.tcp.routers.tcp.tls=true"
- "traefik.tcp.routers.coding-global-db.rule=HostSNI(`*`)"
- "traefik.tcp.services.coding-global-db.loadbalancer.server.port=5432"
- "traefik.tcp.routers.coding-global-db.entrypoints=coding-global-db"
- "traefik.tcp.routers.coding-global-db.service=coding-global-db"
coding-global-pgbackup:
container_name: coding-global-pgbackup
image: prodrigestivill/postgres-backup-local
restart: always
networks:
- proxy
volumes:
- ~/duplicati-volume/source/coding-global-db-pgbackup:/backups
links:
- coding-global-db
depends_on:
- coding-global-db
environment:
- POSTGRES_HOST=${POSTGRES_HOST}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_EXTRA_OPTS=-Fc
- SCHEDULE=@every 6h
- BACKUP_KEEP_DAYS=7
- HEALTHCHECK_PORT=8080
coding-global-bot:
container_name: coding-global-bot
depends_on:
- coding-global-db
links:
- coding-global-db
networks:
- proxy
build:
context: ./
dockerfile: Dockerfile
target: prod
restart: always
environment:
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}/${POSTGRES_DB}?schema=public
labels:
- "traefik.enable=true"
- "traefik.http.routers.coding-global-bot.rule=Host(`bot.coding.global`)"
- "traefik.http.routers.coding-global-bot.entrypoints=websecure"
- "traefik.http.routers.coding-global-bot.tls.certresolver=letsencrypt"
- "traefik.http.services.coding-global-bot.loadbalancer.server.port=3000"
networks:
proxy:
external: false
name: proxy