-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
154 lines (145 loc) · 4.01 KB
/
Copy pathdocker-compose.yml
File metadata and controls
154 lines (145 loc) · 4.01 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
services:
db:
image: postgres:17
container_name: markdown-db
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
ports:
- "${DB_PORT}:${DB_PORT}"
networks:
- markdown-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- db-data:/var/lib/postgresql/data
- ./auth/db/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
backend:
image: sid00r/markdown-backend:latest
build:
context: .
dockerfile: ./docker/backend/Dockerfile
container_name: markdown-backend
environment:
- BACKEND_HOST=${BACKEND_HOST}
- BACKEND_PORT=${BACKEND_PORT}
- JWT_SECRET=${JWT_SECRET}
- LOG_DIR=${LOG_DIR}
- REMOTE_HOST=${REMOTE_HOST}
- FRONTEND_PORT=${FRONTEND_PORT}
ports:
- "${BACKEND_PORT}:${BACKEND_PORT}"
networks:
- markdown-network
volumes:
- storage:/root/storage
- ${LOG_DIR}:${LOG_DIR}
restart: unless-stopped
auth:
image: sid00r/markdown-auth:latest
build:
context: .
dockerfile: ./docker/auth/Dockerfile
container_name: markdown-auth
environment:
- AUTH_HOST=${AUTH_HOST}
- AUTH_PORT=${AUTH_PORT}
- JWT_SECRET=${JWT_SECRET}
- LOG_DIR=${LOG_DIR}
- AUTH_DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}?sslmode=${DB_SSLMODE}
- REMOTE_HOST=${REMOTE_HOST}
- FRONTEND_PORT=${FRONTEND_PORT}
ports:
- "${AUTH_PORT}:${AUTH_PORT}"
depends_on:
- db
networks:
- markdown-network
volumes:
- ${LOG_DIR}:${LOG_DIR}
restart: unless-stopped
gigachat_proxy:
image: sid00r/markdown-gigachat-proxy:latest
build:
context: .
dockerfile: ./docker/gigachat_proxy/Dockerfile
container_name: markdown-gigachat-proxy
environment:
- GIGACHAT_PROXY_PORT=${GIGACHAT_PROXY_PORT}
- GIGACHAT_PROXY_HOST=${GIGACHAT_PROXY_HOST}
- GIGACHAT_AUTH_KEY=${GIGACHAT_AUTH_KEY}
- REMOTE_HOST=${REMOTE_HOST}
- FRONTEND_PORT=${FRONTEND_PORT}
ports:
- "${GIGACHAT_PROXY_PORT}:${GIGACHAT_PROXY_PORT}"
networks:
- markdown-network
restart: unless-stopped
frontend:
image: sid00r/markdown-frontend:latest
build:
context: .
dockerfile: ./docker/frontend/Dockerfile
container_name: markdown-frontend
environment:
- FRONTEND_HOST=${FRONTEND_HOST}
- FRONTEND_PORT=${FRONTEND_PORT}
- VITE_STORAGE_API_BASE_URL=${VITE_STORAGE_API_BASE_URL}
- VITE_AUTH_API_BASE_URL=${VITE_AUTH_API_BASE_URL}
- VITE_GIGACHAT_PROXY_API_BASE_URL=${VITE_GIGACHAT_PROXY_API_BASE_URL}
ports:
- "${FRONTEND_PORT}:${FRONTEND_PORT}"
depends_on:
- backend
- auth
networks:
- markdown-network
restart: unless-stopped
prometheus:
image: prom/prometheus:latest
container_name: markdown-prometheus
volumes:
- ./prometheus/:/etc/prometheus/
ports:
- "9090:9090"
command:
- --config.file=/etc/prometheus/prometheus.yml
networks:
- markdown-network
restart: unless-stopped
grafana:
image: grafana/grafana:latest
container_name: markdown-grafana
ports:
- "3000:3000"
depends_on:
- prometheus
environment:
- GF_SECURITY_ADMIN_USER=${GF_SECURITY_ADMIN_USER}
- GF_SECURITY_ADMIN_PASSWORD=${GF_SECURITY_ADMIN_PASSWORD}
user: "1000"
volumes:
- ./grafana/data:/var/lib/grafana
- ./grafana/grafana.ini:/etc/grafana/grafana.ini:ro
- ./grafana/provisioning:/etc/grafana/provisioning
networks:
- markdown-network
restart: unless-stopped
node_exporter:
image: prom/node-exporter:latest
container_name: markdown-node-exporter
ports:
- "9100:9100"
networks:
- markdown-network
restart: unless-stopped
networks:
markdown-network:
driver: bridge
volumes:
storage:
db-data: