[nginx]docker-compose.yml

version: '3.5'
services:
    nginx:
        image: nginx:latest
        # 端口映射
        ports:
            - "80:80"
            - "443:443"
        # 数据卷
        volumes:
            # 映射主机./conf.d目录到容器/etc/nginx/conf.d目录
            - "$PWD/conf.d:/etc/nginx/conf.d"
            - "$PWD/conf/nginx.conf:/etc/nginx/nginx.conf"
            - "$PWD/html:/usr/share/nginx/html"
            - ./ssl:/etc/nginx/ssl
            - ./log:/var/log/nginx/
        privileged: true
        container_name: "web-nginx"
        restart: always
        networks:
            - web_net
networks:
    web_net:
        name: web_net
原文链接:,转发请注明来源!

发表回复