码迷,mamicode.com
首页 > 其他好文 > 详细

docker-compose 文件参考

时间:2020-10-30 12:28:10      阅读:23      评论:0      收藏:0      [点我收藏+]

标签:wsgi   参考   word   comm   network   start   监听   config   ESS   

参考:

https://www.yuque.com/keep_running/python/prkdk8

version: ‘3‘

services:
  db:
    image: postgres
    restart: always
    environment:
      POSTGRES_PASSWORD: 12345
    networks:
      net-django:
        ipv4_address: 10.127.2.4

  web:
    build: .
    ports:
      - 8000:8000
    restart: always
    privileged: true
    depends_on:
      - db
    networks:
      net-django:
        ipv4_address: 10.127.2.3
    command: bash -c "uwsgi --ini /code/heelo/conf/uwsgi.ini"

  nginx:
    container_name: nginx-container
    restart: always
    depends_on:
      - web
    links:
      - "web:web"
    build: ./nginx
    # 将nginx监听端口映射到宿主机的8080端口
    ports:
      - 8080:80
    networks:
      net-django:
        ipv4_address: 10.127.2.2

networks:
  net-django:
    ipam:
      config:
        - subnet: 10.127.2.0/24

docker-compose 文件参考

标签:wsgi   参考   word   comm   network   start   监听   config   ESS   

原文地址:https://www.cnblogs.com/qianxunman/p/13898613.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!