Files
file-transfer-go/docker-compose.yml
MatrixSeven 70ad644a71 第一版本
2025-07-28 16:33:10 +08:00

58 lines
1.0 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
version: '3.8'
services:
# 主应用服务
chuan:
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:8080"
volumes:
- ./uploads:/root/uploads
- ./logs:/root/logs
environment:
- TZ=Asia/Shanghai
- PORT=8080
- REDIS_URL=redis://redis:6379
depends_on:
- redis
restart: unless-stopped
networks:
- chuan-network
# Redis服务用于存储取件码
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes --requirepass ""
restart: unless-stopped
networks:
- chuan-network
# Nginx反向代理
nginx:
image: nginx:alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./ssl:/etc/nginx/ssl
- ./uploads:/var/www/uploads
depends_on:
- chuan
restart: unless-stopped
networks:
- chuan-network
volumes:
redis_data:
networks:
chuan-network:
driver: bridge