added:增加Linux-server
This commit is contained in:
1 parent
6fe4e9d23f
commit
d78f3f811b
90 files changed
+16784
-1
No files matched your search
@@ -0,0 +1,81 @@
|
||||
# Write Server Docker Compose Configuration
|
||||
# 用于生产环境部署
|
||||
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
write-server:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: write-server
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8016:8016"
|
||||
volumes:
|
||||
# Hugo 博客目录(必须)
|
||||
- ${BLOG_ROOT:-../blog}:/blog
|
||||
# 本地回收站目录
|
||||
- ./recycle:/app/recycle
|
||||
# 日志目录
|
||||
- ./logs:/app/logs
|
||||
# 备份目录
|
||||
- ./backups:/app/backups
|
||||
# 环境变量文件
|
||||
- ./.env:/app/.env:ro
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- PORT=8016
|
||||
- BLOG_ROOT=/blog
|
||||
- TZ=Asia/Shanghai
|
||||
networks:
|
||||
- write-network
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8016/api/stats"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
# 可选:Nginx 反向代理
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
container_name: write-nginx
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
- ./nginx/conf.d:/etc/nginx/conf.d:ro
|
||||
- ./nginx/ssl:/etc/nginx/ssl:ro
|
||||
- ./logs/nginx:/var/log/nginx
|
||||
depends_on:
|
||||
write-server:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- write-network
|
||||
|
||||
# 可选:Redis 缓存
|
||||
# redis:
|
||||
# image: redis:7-alpine
|
||||
# container_name: write-redis
|
||||
# restart: unless-stopped
|
||||
# ports:
|
||||
# - "6379:6379"
|
||||
# volumes:
|
||||
# - redis-data:/data
|
||||
# networks:
|
||||
# - write-network
|
||||
|
||||
networks:
|
||||
write-network:
|
||||
driver: bridge
|
||||
|
||||
# volumes:
|
||||
# redis-data:
|
||||
Reference in new issue
Block a user