-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
73 lines (70 loc) · 1.77 KB
/
docker-compose.yml
File metadata and controls
73 lines (70 loc) · 1.77 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
services:
redis:
image: redis:7-alpine
container_name: logos-redis
restart: unless-stopped
command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru
volumes:
- redis-data:/data
networks:
mx-net:
ipv4_address: 172.20.0.61
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 3
logging:
driver: "json-file"
options:
max-size: "5m"
max-file: "2"
homepage:
image: illyaa/homepage:latest
container_name: logos-homepage
restart: unless-stopped
ports:
- "8081:8081"
volumes:
- ./backend/cache:/app/backend/cache
environment:
- NODE_ENV=production
- PORT=8081
# Redis 配置
- REDIS_URL=redis://redis:6379
# MX-Space 配置
- MX_SPACE_API=${MX_SPACE_API}
- MX_SPACE_TOKEN=${MX_SPACE_TOKEN}
- BLOG_URL=${BLOG_URL}
# GitHub 配置
- GITHUB_TOKEN=${GITHUB_TOKEN}
- GITHUB_USERNAME=${GITHUB_USERNAME}
# Codeforces 配置(可选)
- CODEFORCES_HANDLE=${CODEFORCES_HANDLE:-}
# 牛客配置(可选)
- NOWCODER_USER_ID=${NOWCODER_USER_ID:-}
# AtCoder 配置(可选)
- ATCODER_USERNAME=${ATCODER_USERNAME:-}
depends_on:
redis:
condition: service_healthy
networks:
mx-net:
ipv4_address: 172.20.0.60
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8081/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
volumes:
redis-data:
networks:
mx-net:
external: true
name: core_mx-space