项目中增加Redis,更稳定高效(项目中加redis)
652
2022-10-11
docker-compose 文件参考
参考:
'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.2networks: net-django: ipam: config: - subnet: 10.127.2.0/24
懂得,原来世界如此简单!
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~