generated from Sage-Bionetworks/aws-application-deployment-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
startup.sh
executable file
·20 lines (16 loc) · 971 Bytes
/
startup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
# Inject http_secret into config.yml
# The value is taken from the environment variable, `http_secret` which,
# during ECS deployment comes from the AWS Secrets Manager.
sed -i "s/http_secret/$http_secret/g" /etc/docker/registry/config.yml
# Inject notification listener authorization credentials into config.yml
# The value is taken from the environment variable, `notification_auth` which,
# during ECS deployment comes from the AWS Secrets Manager.
sed -i "s/notification_auth/$notification_auth/g" /etc/docker/registry/config.yml
# Inject bucket name into config.yml
# The value is taken from the environment variable, `BUCKET_NAME` which,
# during ECS deployment comes from the cdk.json file.
sed -i "s/bucket_name/$BUCKET_NAME/g" /etc/docker/registry/config.yml
# this assumed a particular start-up for the container registry
# if the command changes in future versions, this will have to be updated too
/entrypoint.sh /etc/docker/registry/config.yml