python manage.py runserver 0.0.0.0:48009
settings.py 명시
python manage.py runserver --settings=config.settings.deploy 0.0.0.0:48009
gunicorn 실행 명령어
1)
gunicorn --bind 0.0.0.0:48009 config.wsgi:application
2) settings 파일이 기본 경로가 아닐때 사용할 settings.py의 경로를 명시
gunicorn --env DJANGO_SETTINGS_MODULE=config.settings.deploy --bind 0.0.0.0:48009 config.wsgi:application
( 링크: https://docs.gunicorn.org/en/stable/run.html?highlight=--env#django )
static file 모으기 (server 에서만 실행)
python manage.py collectstatic
csrf trust
CSRF_TRUSTED_ORIGINS = ["http://도메인혹은ip주소:포트-마지막에'/'는포함시키지말것"]