Added SSL cert generation and installation. Moved variables to ENV
All checks were successful
AWS Deploy on Push / build (push) Successful in 4m15s

This commit is contained in:
2025-05-20 12:45:55 -05:00
parent 5bc7a72a92
commit 732667cf64
8 changed files with 102 additions and 6 deletions

View File

@@ -1,7 +1,18 @@
#!/bin/bash
# Load environment variables from .env file if it exists
if [ -f .env ]; then
export $(cat .env | xargs)
fi
# Check if required environment variables are set
if [ -z "$FREEDNS_User" ] || [ -z "$FREEDNS_Password" ] || [ -z "$DOMAIN_NAME" ]; then
echo "Error: FREEDNS_User, FREEDNS_Password, and DOMAIN_NAME must be set as environment variables or in a .env file."
exit 1
fi
# Deploy infrastructure
cdk deploy
cdk deploy --app="python3 ${PWD}/app.py"
# Update application on running instances
INSTANCE_IDS=$(aws ec2 describe-instances \

View File

@@ -1,4 +1,19 @@
#!/bin/bash
# Load environment variables from .env file if it exists
if [ -f ${PWD}/.env ]; then
export $(cat ${PWD}/.env | xargs)
fi
# Check if required environment variables are set
if [ -z "$FREEDNS_User" ] || [ -z "$FREEDNS_Password" ] || [ -z "$DOMAIN_NAME" ]; then
echo "Error: FREEDNS_User, FREEDNS_Password, and DOMAIN_NAME must be set as environment variables or in a .env file."
exit 1
fi
# Optional: Print the variables being used (for verification)
echo "Using DOMAIN_NAME: $DOMAIN_NAME"
echo "Using FREEDNS_User: $FREEDNS_User" # Be cautious printing passwords
# Destroy infrastructure
cdk destroy --force
cdk destroy --app="python3 ${PWD}/app.py" --force