프로젝트
[CSAPI] nginx 코드작성 및 이미지 생성
kyeongjun-dev
2021. 12. 10. 12:25
Nginx
- default.conf
upstream django {
ip_hash;
server django:8000;
}
server {
listen 80;
location / {
proxy_pass http://django/;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
일단 80 포트로 들어오는 요청을 django 컨테이너로 proxy 하도록 간단하게 설정했다.
- Dockerfile
FROM nginx:latest
COPY default.conf /etc/nginx/conf.d/default.conf