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

Be/bugfix/#565 ssl 인증서 만료 #566

Merged
merged 3 commits into from
Feb 23, 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
7 changes: 1 addition & 6 deletions .github/workflows/blue-green-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ jobs:
echo "${{ secrets.ENV_FILE }}" > .env
echo "DOCKER_USERNAME=${{ secrets.DOCKER_USERNAME }}" >> .env
echo "GITHUB_SHA=${{ github.sha }}" >> .env
mkdir -p config/nginx/ssl/
echo "${{ secrets.SSL_OPTIONS }}" > config/nginx/ssl/options-ssl-nginx.conf
echo "${{ secrets.SSL_FULLCHAIN }}" > config/nginx/ssl/fullchain.pem
echo "${{ secrets.SSL_PRIVKEY }}" > config/nginx/ssl/privkey.pem
echo "${{ secrets.SSL_DHPARAMS }}" > config/nginx/ssl/ssl-dhparams.pem

- name: Add Remote Host Key to known_hosts
run: |
Expand All @@ -43,7 +38,7 @@ jobs:
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.SSH_PORT }}
source: "backend/.env,backend/deploy.sh,backend/send-slack-message.sh,backend/config,backend/compose.blue-deploy.yml,backend/compose.green-deploy.yml,backend/Dockerfile.nginx"
source: "backend/.env,backend/deploy.sh,backend/send-slack-message.sh,backend/compose.blue-deploy.yml,backend/compose.green-deploy.yml,backend/Dockerfile.nginx"
target: "~/app/"
overwrite: true

Expand Down
5 changes: 0 additions & 5 deletions backend/Dockerfile.nginx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,4 @@ FROM nginx:1.18.0

COPY config/nginx/default.conf /etc/nginx/conf.d/default.conf

COPY config/nginx/ssl/options-ssl-nginx.conf /etc/letsencrypt/options-ssl-nginx.conf
COPY config/nginx/ssl/fullchain.pem /etc/letsencrypt/live/was.tarotmilktea.com/fullchain.pem
COPY config/nginx/ssl/privkey.pem /etc/letsencrypt/live/was.tarotmilktea.com/privkey.pem
COPY config/nginx/ssl/ssl-dhparams.pem /etc/letsencrypt/ssl-dhparams.pem

CMD ["nginx", "-g", "daemon off;"]
12 changes: 2 additions & 10 deletions backend/compose.blue-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,13 @@ services:
depends_on:
- was-blue
- signal-blue
- certbot
volumes:
- /var/www/certbot:/var/www/certbot
- /etc/letsencrypt:/etc/letsencrypt
- /var/log/nginx:/var/log/nginx
networks:
- backend

certbot:
image: certbot/certbot
volumes:
- /etc/letsencrypt
- /var/www/html:/var/www/html
networks:
- backend
command: certonly --webroot --webroot-path=/var/www/html -d was.tarotmilktea.com

networks:
backend:
external: true
Expand Down
12 changes: 2 additions & 10 deletions backend/compose.green-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,13 @@ services:
depends_on:
- was-green
- signal-green
- certbot
volumes:
- /var/www/certbot:/var/www/certbot
- /etc/letsencrypt:/etc/letsencrypt
- /var/log/nginx:/var/log/nginx
networks:
- backend

certbot:
image: certbot/certbot
volumes:
- /etc/letsencrypt
- /var/www/html:/var/www/html
networks:
- backend
command: certonly --webroot --webroot-path=/var/www/html -d was.tarotmilktea.com

networks:
backend:
external: true
Expand Down
Loading