Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Commit 900d262

Browse files
committed
Moved config to the config/ directory (closes #144)
1 parent 89b9c96 commit 900d262

7 files changed

+6
-6
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

lib/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ def load():
5050
return _config
5151
data = None
5252
config_file = os.environ.get('DOCKER_REGISTRY_CONFIG', 'config.yml')
53-
config_path = os.path.join(os.path.dirname(__file__), '..', config_file)
53+
config_path = os.path.join(os.path.dirname(__file__), '..', 'config',
54+
config_file)
5455
with open(config_path) as f:
5556
data = yaml.load(f)
5657
config = data.get('common', {})

setup-configs.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
#!/bin/bash
22

33
WORKER_SECRET_KEY="${WORKER_SECRET_KEY:-$(< /dev/urandom tr -dc A-Za-z0-9 | head -c 32)}"
4-
sed -i "s/ secret_key: REPLACEME/ secret_key: ${WORKER_SECRET_KEY}/" config.yml
4+
sed -i "s/ secret_key: REPLACEME/ secret_key: ${WORKER_SECRET_KEY}/" config/config.yml
55

66
if [[ -z "$GUNICORN_WORKERS" ]] ; then
77
GUNICORN_WORKERS=4
88
fi
99

1010
if [ "$SETTINGS_FLAVOR" = "prod" ] ; then
11-
config=$(<config.yml);
11+
config=$(<config/config.yml);
1212
config=${config//boto_bucket: REPLACEME/boto_bucket: $S3_BUCKET};
1313
config=${config//s3_access_key: REPLACEME/s3_access_key: $AWS_ACCESS_KEY_ID};
1414
config=${config//s3_secret_key: REPLACEME/s3_secret_key: $AWS_SECRET_KEY};
1515
config=${config//s3_bucket: REPLACEME/s3_bucket: $S3_BUCKET};
1616
config=${config//s3_encrypt: REPLACEME/s3_encrypt: ${S3_ENCRYPT:-False}};
1717
config=${config//s3_secure: REPLACEME/s3_secure: ${S3_SECURE:-False}};
18-
printf '%s\n' "$config" >config.yml
18+
printf '%s\n' "$config" >config/config.yml
1919
fi

supervisor.conf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[program:api]
2-
#command = bash -lc "[ -f ~/profile ] && source ~/profile; exec newrelic-admin run-program gunicorn --access-logfile /var/log/supervisor/access.log --debug -k gevent --max-requests 100 --graceful-timeout 3600 -t 3600 -b 0.0.0.0:$PORT_WWW -w 8 wsgi:application"
3-
command = bash -lc "[ -f ~/profile ] && source ~/profile; exec gunicorn -c gunicorn_config.py wsgi:application"
2+
command = bash -lc "[ -f ~/profile ] && source ~/profile; exec gunicorn -c config/gunicorn_config.py wsgi:application"
43
#environment = NEW_RELIC_CONFIG_FILE="/home/dotcloud/newrelic.ini"
54
directory = /home/dotcloud/
65
redirect_stderr = true

0 commit comments

Comments
 (0)