-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.example.yaml
More file actions
118 lines (111 loc) · 2.94 KB
/
compose.example.yaml
File metadata and controls
118 lines (111 loc) · 2.94 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# Common configuration for all minio instances
x-minio-common: &minio-common
image: minio/minio:RELEASE.2025-03-12T18-04-18Z
command: server --console-address ":9001" http://minio{1...2}/minio_data{1...2}
expose:
- 9000
- 9001
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-minioadmin}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:?err}
healthcheck:
test:
[
"CMD",
"curl",
"-f",
"http://localhost:9000/minio/health/live"
]
interval: 30s
timeout: 20s
retries: 3
networks:
- private
services:
db:
image: postgres:17
restart: always
expose:
- 5432
environment:
POSTGRES_DB: ${POSTGRES_DB:-chat}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?err}
POSTGRES_PORT: ${POSTGRES_PORT:-5432}
volumes:
- "${POSTGRES_DATA_PATH:?err}:/var/lib/postgresql/data"
networks:
- private
minio1:
<<: *minio-common
hostname: minio1
restart: always
volumes:
- "${MINIO1_1_DATA_PATH:?err}:/minio_data1"
- "${MINIO1_2_DATA_PATH:?err}:/minio_data2"
minio2:
<<: *minio-common
hostname: minio2
restart: always
volumes:
- "${MINIO2_1_DATA_PATH:?err}:/minio_data1"
- "${MINIO1_2_DATA_PATH:?err}:/minio_data2"
minio:
image: nginx:1.27.4-alpine
hostname: nginx
restart: always
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "9000:9000"
- "9001:9001"
depends_on:
minio1:
condition: service_healthy
restart: true
minio2:
condition: service_healthy
restart: true
networks:
- private
backend:
image: ghcr.io/hypergonial/chat-backend:latest
environment:
# Address to listen on, including the port
LISTEN_ADDR: 0.0.0.0:8080
# Postgres connection string
DATABASE_URL: ${DATABASE_URL}
# URL of the S3 instance
S3_URL: ${S3_URL:-http://minio:9000}
# S3 region
S3_REGION: ${S3_REGION:?err}
# S3 credentials
S3_ACCESS_KEY: ${S3_ACCESS_KEY:?err}
S3_SECRET_KEY: ${S3_SECRET_KEY:?err}
# Remove if not using Firebase for push notifications
GOOGLE_APPLICATION_CREDENTIALS: ${GOOGLE_APPLICATION_CREDENTIALS:-/config/firebase.json}
# MACHINE_ID should be unique per machine
MACHINE_ID: ${MACHINE_ID:?err}
# PROCESS_ID should be unique per process
PROCESS_ID: ${PROCESS_ID:?err}
# Random secret for JWT
APP_SECRET: ${APP_SECRET:?err}
# Set this to 1 or "full" to get a backtrace on panic
RUST_BACKTRACE: ${RUST_BACKTRACE:-0}
ports:
- 8080:8080
volumes:
- "${CONFIG_PATH:?err}:/config:ro"
depends_on:
minio:
condition: service_started
restart: true
db:
condition: service_started
restart: true
restart: always
networks:
- private
networks:
private:
external: false