Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy/#380/automatic renewal of ssl #387

Merged
merged 3 commits into from
Mar 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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