강동현

웹서버 설정에 인증서 추가 및 https 포트 개방

......@@ -15,4 +15,6 @@ services:
dockerfile: ./web/Dockerfile
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- /etc/letsencrypt:/etc/letsencrypt
......
......@@ -19,6 +19,6 @@ FROM nginx:latest
COPY web/default.conf /etc/nginx/conf.d/default.conf
COPY --from=build /usr/web/build /usr/web/build
EXPOSE 80
EXPOSE 443
CMD ["nginx", "-g", "daemon off;"]
\ No newline at end of file
CMD ["nginx", "-g", "daemon off;"]
......
server {
listen 80;
listen 443 ssl default_server;
server_name 2020105578.oss2021.tk;
ssl_certificate /etc/letsencrypt/live/2020105578.oss2021.tk/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/2020105578.oss2021.tk/privkey.pem;
location / {
root /usr/web/build;
index index.html;
try_files $uri $uri/ /index.html;
}
}
\ No newline at end of file
}
......