nginx

    [Docker] django 의 Collectstatic 명령어로 Nginx 컨테이너와 동기화 할 static 파일 취합하기

    Collectstatic 명령어 python manage.py collectstatic 프로젝트에 있던 static 파일들이 staticfiles 라는 폴더가 생성된 곳에 복사됨 settings.py STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') 생성된 staticfiles 경로에 있는 모든 static 파일들을 저장시키는 설정 Dockerfile RUN python manage.py collectstatic 도커 파일에 위에 한 줄 추가 Docker Container 에서 image 생성 Dockerfile upload해서 이미지 만들기 다음은 nginx와 연결시키는 과정을 이어서 포스팅하도록 하겠습니다,,