1) django의 runserver 명령어를 사용해 배포해주세요
- 사용 이미지 : python:3.10.8
2) postgresql을 연동한 후 배포해주세요
- 사용 이미지 : postgres:14.5
3) nginx를 연동한 후 배포해주세요
- 사용 이미지 : nginx:1.23.2
4) gunicorn을 사용하여 배포해주세요
yaml: line 9: mapping values are not allowed in this context
docker-compose.yml
파일에서 문법이 에러난 듯해서, 여기저기 고쳐보았지만 똑같았습니다...Error response from daemon: driver failed programming external connectivity on endpoint nginx ~ : Bind for 0.0.0.0:80 failed: port is already allocated
docker-compose.yml
파일 수정할 때, django 컨테이너 관련 옵션들중에 포트포워딩 관련 옵션이 겹쳐있어서 생긴 에러였습니다. ...
backend:
container_name: backend
build: ./backend/
ports: # 삭제
- 80:8000 # 삭제
...
이와 같이 작성하여 에러를 해결했습니다!역시나 문법(들여쓰기)을 잘 확인하자..
docker-compose, Dockerfile 다루는 법을 더 복습해야 한다.