Moved repo url and email for letsencrypt to env variables
All checks were successful
AWS Deploy on Push / build (push) Successful in 4m15s
All checks were successful
AWS Deploy on Push / build (push) Successful in 4m15s
This commit is contained in:
@@ -19,6 +19,8 @@ class IptvUpdaterStack(Stack):
|
||||
freedns_password: str,
|
||||
domain_name: str,
|
||||
ssh_public_key: str,
|
||||
repo_url: str,
|
||||
letsencrypt_email: str,
|
||||
**kwargs
|
||||
) -> None:
|
||||
super().__init__(scope, construct_id, **kwargs)
|
||||
@@ -165,7 +167,9 @@ class IptvUpdaterStack(Stack):
|
||||
userdata.add_commands(
|
||||
f'export FREEDNS_User="{freedns_user}"',
|
||||
f'export FREEDNS_Password="{freedns_password}"',
|
||||
f'export DOMAIN_NAME="{domain_name}"'
|
||||
f'export DOMAIN_NAME="{domain_name}"',
|
||||
f'export REPO_URL="{repo_url}"',
|
||||
f'export LETSENCRYPT_EMAIL="{letsencrypt_email}"'
|
||||
)
|
||||
|
||||
# Adds one or more commands to the userdata object.
|
||||
|
||||
@@ -9,7 +9,7 @@ pip3 install certbot certbot-nginx
|
||||
|
||||
cd /home/ec2-user
|
||||
|
||||
git clone https://git.fiorinis.com/Home/iptv-updater-aws.git
|
||||
git clone ${REPO_URL}
|
||||
cd iptv-updater-aws
|
||||
|
||||
pip3 install -r requirements.txt
|
||||
@@ -36,7 +36,7 @@ EOF
|
||||
crontab -u root -l >/dev/null 2>&1 || (echo "" | crontab -u root -)
|
||||
|
||||
# Install and configure acme.sh
|
||||
curl https://get.acme.sh | sh -s email=stefano@fiorinis.com
|
||||
curl https://get.acme.sh | sh -s email=${LEFTENCRYPT_EMAIL}
|
||||
|
||||
# Configure acme.sh to use DNS API for FreeDNS
|
||||
. "/.acme.sh/acme.sh.env"
|
||||
|
||||
Reference in New Issue
Block a user