-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.remote.yml
More file actions
98 lines (93 loc) · 2.64 KB
/
Copy pathdocker-compose.remote.yml
File metadata and controls
98 lines (93 loc) · 2.64 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
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
91
92
93
94
95
96
97
98
services:
c3-api:
build:
context: .
dockerfile: api/Dockerfile
container_name: c3-api
restart: unless-stopped
environment:
NODE_ENV: production
API_HOST: 0.0.0.0
API_PORT: 8080
API_ORIGIN: https://c3-api.mdpstudio.com.au
APP_ORIGIN: https://c3.mdpstudio.com.au
COOKIE_SECURE: "true"
DATABASE_URL: postgres://c3_app:${POSTGRES_PASSWORD}@c3-postgres:5432/c3
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET}
GOOGLE_REDIRECT_URI: https://c3-api.mdpstudio.com.au/api/auth/google/callback
SMTP_URL: ${SMTP_URL}
MAIL_FROM: ${MAIL_FROM}
PASSWORD_RESET_BASE_URL: https://c3.mdpstudio.com.au
CSP_REPORT_IP_SALT: ${CSP_REPORT_IP_SALT}
TOTP_ENCRYPTION_KEY: ${TOTP_ENCRYPTION_KEY}
TOTP_PREVIOUS_ENCRYPTION_KEYS: ${TOTP_PREVIOUS_ENCRYPTION_KEYS:-}
depends_on:
c3-postgres:
condition: service_healthy
networks:
- c3-private
- mdp-tunnel
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:8080/api/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
interval: 30s
timeout: 5s
retries: 5
c3-postgres:
image: postgres:16-alpine
container_name: c3-postgres
restart: unless-stopped
environment:
POSTGRES_DB: c3
POSTGRES_USER: c3_app
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- c3-postgres-data:/var/lib/postgresql/data
networks:
- c3-private
healthcheck:
test: ["CMD-SHELL", "pg_isready -U c3_app -d c3"]
interval: 10s
timeout: 5s
retries: 5
c3-backup:
image: prodrigestivill/postgres-backup-local:16
container_name: c3-postgres-backup
restart: unless-stopped
environment:
POSTGRES_HOST: c3-postgres
POSTGRES_DB: c3
POSTGRES_USER: c3_app
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
SCHEDULE: "@daily"
BACKUP_KEEP_DAYS: 7
BACKUP_KEEP_WEEKS: 4
BACKUP_KEEP_MONTHS: 3
HEALTHCHECK_PORT: 8080
volumes:
- c3-postgres-backups:/backups
depends_on:
c3-postgres:
condition: service_healthy
networks:
- c3-private
c3-cloudflared:
image: cloudflare/cloudflared:latest
container_name: c3-cloudflared
restart: unless-stopped
profiles:
- dedicated-tunnel
command: tunnel --no-autoupdate run --token ${CLOUDFLARED_TUNNEL_TOKEN}
depends_on:
c3-api:
condition: service_healthy
networks:
- c3-private
networks:
c3-private:
driver: bridge
mdp-tunnel:
external: true
volumes:
c3-postgres-data:
c3-postgres-backups: