Switch the registry and index to use real s3 and rds.
This commit is contained in:
parent
281785e612
commit
84adf680b9
5 changed files with 154 additions and 104 deletions
39
config.py
39
config.py
|
@ -1,3 +1,5 @@
|
|||
from peewee import MySQLDatabase, SqliteDatabase
|
||||
|
||||
class FlaskConfig(object):
|
||||
SECRET_KEY = '1cb18882-6d12-440d-a4cc-b7430fb5f884'
|
||||
|
||||
|
@ -13,5 +15,40 @@ class MailConfig(object):
|
|||
TESTING = False
|
||||
|
||||
|
||||
class ProductionConfig(FlaskConfig, MailConfig):
|
||||
class SQLiteDB(object):
|
||||
DB_NAME = 'test.db'
|
||||
DB_CONNECTION_ARGS = {
|
||||
'threadlocals': True
|
||||
}
|
||||
DB_DRIVER = SqliteDatabase
|
||||
|
||||
|
||||
class RDSMySQL(object):
|
||||
DB_NAME = 'quay'
|
||||
DB_CONNECTION_ARGS = {
|
||||
'host': 'fluxmonkeylogin.cb0vumcygprn.us-east-1.rds.amazonaws.com',
|
||||
'user': 'fluxmonkey',
|
||||
'passwd': '8eifM#uoZ85xqC^',
|
||||
'threadlocals': True
|
||||
}
|
||||
DB_DRIVER = MySQLDatabase
|
||||
|
||||
|
||||
class S3Storage(object):
|
||||
AWS_ACCESS_KEY = 'AKIAJWZWUIS24TWSMWRA'
|
||||
AWS_SECRET_KEY = 'EllGwP+noVvzmsUGQJO1qOMk3vm10Vg+UE6xmmpw'
|
||||
REGISTRY_S3_BUCKET = 'quay-registry'
|
||||
STORAGE_KIND = 's3'
|
||||
|
||||
|
||||
class LocalStorage(object):
|
||||
STORAGE_KIND = 'local'
|
||||
LOCAL_STORAGE_DIR = '/tmp/registry'
|
||||
|
||||
|
||||
class DebugConfig(FlaskConfig, MailConfig, LocalStorage, SQLiteDB):
|
||||
REGISTRY_SERVER = 'localhost:5000'
|
||||
|
||||
|
||||
class ProductionConfig(FlaskConfig, MailConfig, S3Storage, RDSMySQL):
|
||||
REGISTRY_SERVER = 'quay.io'
|
||||
|
|
Reference in a new issue