File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -57,15 +57,25 @@ ENV PORT 80
57
57
58
58
CMD ["node", "server.js"]
59
59
60
+ #######################################- 여기서부터 ngninx dockerfile -##########################################
60
61
# #nginx 이미지 사용
61
62
# FROM nginx:latest
62
63
63
- # #nignx와 certbot 설치
64
- # RUN apt-get update && apt-get install -y certbot python3-certbot-nginx
64
+ # #nignx와 certbot 설치 -(+인증서 갱신을 위한 cron)
65
+ # RUN apt-get update && apt-get install -y certbot python3-certbot-nginx cron
65
66
66
67
# #nginx.conf(설정파일 복사)
67
68
# COPY nginx.conf /etc/nginx/nginx.conf
68
69
70
+ # #SSL 인증서 갱신을 위한 cron 스크립트 복사
71
+ # COPY renew_ssl_cert.sh /renew_ssl_cert.sh
72
+
73
+ # #스크립트 권한 부여
74
+ # RUN chmod +x /renew_ssl_cert.sh
75
+
76
+ # #cron 작업 추가
77
+ # RUN echo "0 0 1 * * root /renew_ssl_cert.sh" >> /etc/crontab
78
+
69
79
# #port
70
80
# EXPOSE 80
71
81
# EXPOSE 443
@@ -76,3 +86,4 @@ CMD ["node", "server.js"]
76
86
77
87
# #컨테이너가 실행될 때 entrypoint.sh 실행
78
88
# CMD ["/entrypoint.sh"]
89
+
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Certbot을 사용하여 SSL 인증서 갱신
4
+ certbot renew --quiet --nginx
You can’t perform that action at this time.
0 commit comments