version: '3'
services:
  nginx:
    container_name: nginx
    image: nginx
    restart: always
    ports:
      - 80:80
    privileged: true
    volumes:
      - ./conf/proxy.conf:/etc/nginx/proxy.conf
      - ./conf/nginx.conf:/etc/nginx/nginx.conf
      - ./conf/conf.d/:/etc/nginx/conf.d/
      - ./html/:/usr/share/nginx/html/
      - ./logs/:/var/log/nginx/
    networks:
      - myweb

   deploy:
       replicas: 2
       resources:
         limits:
           cpus: '2'
           memory: 4G

networks:

  myweb:
    driver: bridge

 # 启动

docker-compose --compatibility up -d

 

相关文章:

  • 2022-02-27
  • 2022-12-23
  • 2021-07-18
  • 2021-12-31
  • 2022-12-23
  • 2021-05-18
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-09
  • 2022-12-23
  • 2020-05-03
  • 2019-07-29
  • 2021-07-14
  • 2022-12-23
相关资源
相似解决方案