forked from sfproductlabs/tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockercmd.sh
More file actions
18 lines (14 loc) · 788 Bytes
/
dockercmd.sh
File metadata and controls
18 lines (14 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
# executed on docker-image (aws task) startup
# AWS_REGION=eu-central-1
######
# read sensitive information from AWS EC2 parameter store
# this uses the 'ecsInstance' role which needs access rights on SSM::Get-Parameters
# (1) retrieve data from aws ssm store
# (2) extract value from json using jquery (-r is 'raw', no parentheses and proper new lines)
# TRACKER
# aws ssm get-parameters --names $SSM_ID_TRACKER_CERT --no-with-decryption --region $AWS_REGION --output json | jq -r '.Parameters[0] | .Value' > /app/tracker/server.crt
# aws ssm get-parameters --names $SSM_ID_TRACKER_KEY --with-decryption --region $AWS_REGION --output json | jq -r '.Parameters[0] | .Value' > /app/tracker/server.key
######
# start supervisor
supervisord -c /etc/supervisor/supervisord.conf