Skip to content

Commit

Permalink
Merge pull request #387 from modern-agile-team/deploy/#380/automatic_…
Browse files Browse the repository at this point in the history
…renewal_of_ssl

Deploy/#380/automatic renewal of ssl
  • Loading branch information
2swo authored Mar 30, 2024
2 parents d90543e + 5a14c6c commit 63493fe
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 11 additions & 2 deletions dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,21 @@ EXPOSE 3000
# #nginx 이미지 사용
# FROM nginx:latest

# #nignx와 certbot 설치
# RUN apt-get update && apt-get install -y certbot python3-certbot-nginx
# #nignx와 certbot 설치 -(+인증서 갱신을 위한 cron)
# RUN apt-get update && apt-get install -y certbot python3-certbot-nginx cron

# #nginx.conf(설정파일 복사)
# COPY nginx.conf /etc/nginx/nginx.conf

# #SSL 인증서 갱신을 위한 cron 스크립트 복사
# COPY renew_ssl_cert.sh /renew_ssl_cert.sh

# #스크립트 권한 부여
# RUN chmod +x /renew_ssl_cert.sh

# #cron 작업 추가
# RUN echo "0 0 1 * * root /renew_ssl_cert.sh" >> /etc/crontab

# #port
# EXPOSE 80
# EXPOSE 443
Expand Down
4 changes: 4 additions & 0 deletions renew_ssl_cert.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

# Certbot을 사용하여 SSL 인증서 갱신
certbot renew --quiet --nginx

0 comments on commit 63493fe

Please sign in to comment.