Docker  安装 Nginx

Docker 安装 Nginx

Scroll Down

Docker 安装 nginx

docker-compose.yml 文件

version: "3.1"
services:
  nginx:
    image: nginx:1.15
    restart: always
    privileged: true    
    ports:
      - "8080:8080"
      - "80:80"
      - "443:443"
    volumes:
      - ./conf/conf.d:/etc/nginx/conf.d
      - ./conf/nginx.conf:/etc/nginx/nginx.conf
      - ./log:/var/log/nginx
      - ./www:/var/www
      - /etc/letsencrypt:/etc/letsencrypt
    container_name: nginx1.15
    networks:
      nginx_networks:
        aliases:
          - nginx_networks
networks:
  nginx_networks: