Skip to content

Commit

Permalink
feat: Add CERTBOT_EMAIL to docker-compose.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Armadillidiid committed Mar 8, 2024
1 parent 8791bc2 commit 388229a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
echo 'export GOOGLE_MAP_API_KEY="${{ secrets.GOOGLE_MAP_API_KEY }}"' >> export-env
echo 'export DJANGO_ALLOWED_HOSTS="${{ secrets.DJANGO_ALLOWED_HOSTS }}"' >> export-env
echo 'export SERVER_NAME="${{ vars.SERVER_NAME }}"' >> export-env
echo 'export CERTBOT_EMAIL="${{ secrets.CERTBOT_EMAIL }}"' >> export-env
echo 'export ECR_REGISTRY="${{ steps.login-ecr.outputs.registry }}"' > export-ecr
echo 'export ECR_REPOSITORY="${{ env.ECR_REPOSITORY }}"' >> export-ecr
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ services:
- APP_HOST=app
- APP_PORT=8000
- SERVER_NAME=${SERVER_NAME}
- CERTBOT_EMAIL=${CERTBOT_EMAIL}
volumes:
- ./nginx/proxy_params:/etc/nginx/proxy_params
- ./nginx/default.conf.template:/etc/nginx/templates/default.conf.template
Expand All @@ -62,7 +63,6 @@ services:
- ./data/certbot/www:/var/www/certbot
depends_on:
- app
- certbot

certbot:
image: certbot/certbot:v2.9.0
Expand Down
6 changes: 3 additions & 3 deletions nginx/start.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash

domains=($SERVER_NAME)
domains=($SERVER_NAME www.$SERVER_NAME)
rsa_key_size=4096
data_path="./data/certbot"
email="[email protected]"
staging=0 # Set to 1 if you're testing your setup to avoid hitting request limits
email=$CERTBOT_EMAIL
staging=0 # Set to 1 to avoid hitting request limits

if [ -d "$data_path" ]; then
read -p "Existing data found for $domains. Continue and replace existing certificate? (y/N) " decision
Expand Down

0 comments on commit 388229a

Please sign in to comment.