version: "3.7"

# docker network create nginx_bridge
# networks:
#   nginx_bridge:
#     driver: bridge

services:
  nginx:
    image: nginx:stable-alpine
    # build:
    #   context: .
    #   dockerfile: Dockerfile
    container_name: $CONTAINER_NAME
    restart: always
    privileged: true
    environment:
      - TZ=Asia/Shanghai
    ports:
      - $SXZ_HTTP_PORT:80
      # - 80:80
      # - 443:443
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
      - ./conf.d:/etc/nginx/conf.d
      - ./setting:/etc/nginx/setting
      - /var/log/$CONTAINER_NAME/logs:/var/log/nginx
      - ./dist:/opt/dist:ro
    # networks:
    #   - nginx_bridge
