From 2e2e6867bdcf4d1912c553403a5721de43ff03c3 Mon Sep 17 00:00:00 2001 From: Emanuel Borsboom Date: Sat, 23 Aug 2014 17:19:06 +0000 Subject: [PATCH] Update to work with latest `registry` repo from Docker --- Dockerfile | 2 +- readme.md | 6 +++--- run.sh | 14 +++++++++----- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 059e597..da7a4f9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -from shipyard/docker-registry +from registry maintainer Shipyard Project "http://shipyard-project.com" run apt-get update run apt-get -y upgrade diff --git a/readme.md b/readme.md index 34729bb..1421f75 100644 --- a/readme.md +++ b/readme.md @@ -34,7 +34,7 @@ the password at run via environment variables (see below). # Running on S3 To run with Amazon S3 as the backing store, you will need the following environment variables: -* `AWS_ACCESS_KEY_ID`: Your AWS Access Key ID (make sure it has S3 access) -* `AWS_SECRET_KEY`: Your AWS Secret Key -* `S3_BUCKET`: Your S3 bucket to store images +* `AWS_KEY`: Your AWS Access Key ID (make sure it has S3 access) +* `AWS_SECRET`: Your AWS Secret Key +* `AWS_BUCKET`: Your S3 bucket to store images * `SETTINGS_FLAVOR`: This must be set to `prod` diff --git a/run.sh b/run.sh index 7e636c1..15c6b69 100755 --- a/run.sh +++ b/run.sh @@ -204,8 +204,7 @@ stopsignal=QUIT [program:registry] priority=10 user=root -command=gunicorn --access-logfile - --debug --max-requests 5000 --graceful-timeout 3600 -t 3600 -k gevent -b 0.0.0.0:5000 -w 4 wsgi:application -directory=/docker-registry +command=docker-registry autostart=true autorestart=true stopsignal=QUIT @@ -233,8 +232,13 @@ if [ ! -e $PASSWORD_FILE ] ; then htpasswd -bc $PASSWORD_FILE admin $ADMIN_PASSWORD fi -# configure registry -cd /docker-registry -bash setup-configs.sh +# Compatibility with older version's shipyard/docker-registry environment variables +export AWS_BUCKET=${AWS_BUCKET:-$S3_BUCKET} +export AWS_KEY=${AWS_KEY:-$AWS_ACCESS_KEY_ID} +export AWS_SECRET=${AWS_SECRET:-$AWS_SECRET_KEY} +export AWS_ENCRYPT=${AWS_ENCRYPT:-$S3_ENCRYPT} +export AWS_SECURE=${AWS_SECURE:-$S3_SECURE} +export OS_CONTAINER=${OS_CONTAINER:-$SWIFT_CONTAINER} + # run supervisor supervisord -c /etc/supervisor/supervisor.conf -n