ishop/docker-compose.yml
2025-08-10 12:37:00 +08:00

48 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:
usdt-shop:
build: .
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- PORT=3000
# UPay配置 - 生产环境时需要修改这些值
- UPAY_APP_ID=${UPAY_APP_ID:-M1C40DvS}
- UPAY_APP_SECRET=${UPAY_APP_SECRET:-a2nqkkqRb09LIe87}
volumes:
# 持久化数据库文件
- ./database:/app/database
# 持久化上传的图片(如果有)
- ./public/images:/app/public/images
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000"]
timeout: 5s
interval: 30s
retries: 3
start_period: 40s
# Nginx反向代理可选
nginx:
image: nginx:alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./ssl:/etc/nginx/ssl:ro
depends_on:
- usdt-shop
restart: unless-stopped
profiles:
- nginx
networks:
default:
driver: bridge
volumes:
database:
driver: local