Initial commit - 玩玩云文件管理系统 v1.0.0
- 完整的前后端代码 - 支持本地存储和SFTP存储 - 文件分享功能 - 上传工具源代码 - 完整的部署文档 - Nginx配置模板 技术栈: - 后端: Node.js + Express + SQLite - 前端: Vue.js 3 + Axios - 存储: 本地存储 / SFTP远程存储
This commit is contained in:
53
docker-compose.yml
Normal file
53
docker-compose.yml
Normal file
@@ -0,0 +1,53 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
image: wanwanyun-backend
|
||||
container_name: wanwanyun-backend
|
||||
restart: always
|
||||
ports:
|
||||
- "40001:40001"
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
- /app/node_modules
|
||||
- ./upload-tool:/upload-tool
|
||||
- ./storage:/app/storage # 本地存储卷
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- STORAGE_ROOT=/app/storage # 存储根目录(不硬编码)
|
||||
networks:
|
||||
- wanwanyun-network
|
||||
|
||||
frontend:
|
||||
image: nginx:alpine
|
||||
container_name: wanwanyun-frontend
|
||||
restart: always
|
||||
ports:
|
||||
- "8080:80"
|
||||
- "8443:443"
|
||||
volumes:
|
||||
- ./frontend:/usr/share/nginx/html
|
||||
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
|
||||
- ./certbot/conf:/etc/letsencrypt
|
||||
- ./certbot/www:/var/www/certbot
|
||||
depends_on:
|
||||
- backend
|
||||
networks:
|
||||
- wanwanyun-network
|
||||
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
|
||||
|
||||
certbot:
|
||||
image: certbot/certbot
|
||||
container_name: wanwanyun-certbot
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./certbot/conf:/etc/letsencrypt
|
||||
- ./certbot/www:/var/www/certbot
|
||||
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
|
||||
|
||||
networks:
|
||||
wanwanyun-network:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user