-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
55 lines (50 loc) · 1.32 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
version: '3.8'
services:
frontend:
build:
context: frontend
dockerfile: Dockerfile
args:
VITE_BACKEND_URL: ${VITE_BACKEND_URL}
VITE_CLOUDFLARE_SITE_KEY: ${VITE_CLOUDFLARE_SITE_KEY}
ports:
- "8080:8080"
- "8443:8443"
volumes:
- ./ssl:/etc/ssl # 挂载本地 SSL 目录到容器
environment:
- VITE_BACKEND_URL=${VITE_BACKEND_URL}
- VITE_CLOUDFLARE_SITE_KEY=${VITE_CLOUDFLARE_SITE_KEY}
- HTTPS_ENABLED=${HTTPS_ENABLED:-false}
depends_on:
- backend
backend:
build:
context: backend
dockerfile: Dockerfile
ports:
- "${SERVER_PORT:-10100}:${SERVER_PORT:-10100}"
environment:
- SERVER_HOST=${SERVER_HOST:-'0.0.0.0'}
- SERVER_PORT=${SERVER_PORT:-'10100'}
- CORS_ORIGIN=${CORS_ORIGIN}
- VERIFY_DOMAIN=${VERIFY_DOMAIN}
- TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN}
- MONGODB_DSN=${MONGODB_DSN:-mongodb://mongodb:27017/kitan}
- REDIS_DSN=${REDIS_DSN:-redis://redis:6379}
- DEBUG=${DEBUG:-false}
- CLOUDFLARE_SECRET_KEY=${CLOUDFLARE_SECRET_KEY}
depends_on:
- mongodb
- redis
mongodb:
image: mongo:latest
volumes:
- mongodb_data:/data/db
redis:
image: redis:alpine
volumes:
- redis_data:/data
volumes:
mongodb_data:
redis_data: