30 lines
715 B
YAML
30 lines
715 B
YAML
# ============================================
|
|
# 仅主 Nginx 的 Docker Compose 配置
|
|
# 适用场景:各个服务独立部署,不与此文件一起管理
|
|
# ============================================
|
|
|
|
version: "3.8"
|
|
|
|
services:
|
|
nginx:
|
|
image: nginx:alpine
|
|
container_name: main-nginx
|
|
restart: always
|
|
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
|
|
- ./nginx/logs:/var/log/nginx
|
|
networks:
|
|
- app-network
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
|
|
networks:
|
|
app-network:
|
|
driver: bridge
|
|
name: aliyun-app-network
|