0
나는 this tutorial을 통과 할 것이고 나는 성공적으로 스택을 만들고 실행하고있다.초보자 도커 도커 - 작성
내 호스트의 코드 (web
서비스)를 변경하면 은이 브라우저에서 페이지를 다시로드 할 때 자동으로 변경됩니다. 나는 왜 그렇게하는지 이해하지 못합니다. 여기 내 docker-compose.yml
파일입니다 :
web:
restart: always
build: ./web
expose:
- "8000"
links:
- postgres:postgres
- redis:redis
volumes:
- ./web:/usr/src/app
- ./web/static:/usr/src/app/static
env_file: .env
environment:
DEBUG: 'true'
command: /usr/local/bin/gunicorn docker_django.wsgi:application -w 2 -b :8000
nginx:
restart: always
build: ./nginx/
ports:
- "80:80"
volumes:
- /www/static
volumes_from:
- web
links:
- web:web
postgres:
restart: always
image: postgres:latest
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data/
redis:
restart: always
image: redis:latest
ports:
- "6379:6379"
volumes:
- redisdata:/data
나는 이것이 내가 gunicorn
뜨거운 재로드를 실제로 할 수있는 --reload
플래그를 필요로 믿기 때문에 재로드를하고 gunicorn
이라고 생각하지 않았다.
감사합니다. 왜 gunicorn은'--reload' 플래그를 가지고 있습니까? 또한'웨이트리스'나 장고'runserver '와 같은 서버를 사용할 때 실제로 코드가 반영되도록 재로드가 필요한 것처럼 보입니다. – qarthandso
환경 변수'DEBUG : true'가 있기 때문에 이런 일이 일어난다 고 생각합니다. – zachdb86
Django에서'settings.py'에 영향을 미칠 수 있지만 왜 파일을 제공하는'gunicorn '에 영향을 미칩니 까? – qarthandso