init
This commit is contained in:
48
admin/docker-compose.yml
Normal file
48
admin/docker-compose.yml
Normal file
@@ -0,0 +1,48 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
admin-frontend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: dianshang-admin
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
# SSL证书挂载(如果使用)
|
||||
- ./ssl:/etc/nginx/ssl:ro
|
||||
# 日志挂载
|
||||
- ./logs:/var/log/nginx
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
networks:
|
||||
- dianshang-network
|
||||
depends_on:
|
||||
- backend
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
|
||||
backend:
|
||||
image: your-backend-image:latest # 替换为你的后端镜像
|
||||
container_name: dianshang-backend
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8080:8080"
|
||||
environment:
|
||||
- GO_ENV=production
|
||||
networks:
|
||||
- dianshang-network
|
||||
|
||||
networks:
|
||||
dianshang-network:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
ssl-certs:
|
||||
nginx-logs:
|
||||
Reference in New Issue
Block a user