Skip to content

Commit

Permalink
Adding public hostname from ec2 to configuration (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
augustocdias committed Feb 20, 2020
1 parent 336e501 commit a6c21e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cloud_formation.yml
Expand Up @@ -163,12 +163,14 @@ Resources:
systemctl start docker systemctl start docker
usermod -a -G docker ec2-user usermod -a -G docker ec2-user


export publichost=$(ec2-metadata --public-hostname | cut -d ' ' -f2)
# Create configuration file # Create configuration file
mkdir -p /home/ec2-user/podsync/data mkdir -p /home/ec2-user/podsync/data
tee /home/ec2-user/podsync/config.toml <<EOF tee /home/ec2-user/podsync/config.toml <<EOF
[server] [server]
port = ${PodsyncPort} port = ${PodsyncPort}
data_dir = "/home/ec2-user/podsync/data" data_dir = "/home/ec2-user/podsync/data"
hostname = "http://$publichost:${PodsyncPort}"


[tokens] [tokens]
youtube = "${YouTubeApiKey}" youtube = "${YouTubeApiKey}"
Expand Down

0 comments on commit a6c21e6

Please sign in to comment.