-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathentrypoint.sh
More file actions
executable file
·24 lines (20 loc) · 844 Bytes
/
entrypoint.sh
File metadata and controls
executable file
·24 lines (20 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env sh
sleep 10 # concierge is slow as hell to populate
consul_addr=$(echo http://$CONSUL_HOST:8500)
aws_key=$(consul kv get -http-addr=$consul_addr 'aws/auth/concierge/key')
aws_secret=$(consul kv get -http-addr=$consul_addr 'aws/auth/concierge/secret')
aws_region=$(consul kv get -http-addr=$consul_addr 'aws/region')
mkdir /root/.aws
printf "[default]\naws_access_key_id = $aws_key\naws_secret_access_key = $aws_secret\n" > /root/.aws/credentials
chmod u+rw,og-rwx /root/.aws/credentials
# printf "[default]\nregion = $aws_region\n" > /root/.aws/config
# chmod u+rw,og-rwx /root/.aws/config
echo "consul_addr $consul_addr"
echo $(which python)
echo $(which pip)
echo $(which python3)
echo $(which pip3)
echo $(uname -s | tr A-Z a-z)
echo "$aws_region"
/usr/bin/python3 /var/www/concierge/bin/server.py
# python3 -m http.server