updated dockerfile, spacing adjustments
This commit is contained in:
parent
b757ceff57
commit
6c7095ec5a
14 changed files with 36 additions and 16 deletions
|
@ -81,6 +81,10 @@ def module_exists(module_name):
|
|||
default=config.CACHE_TYPE,
|
||||
type=click.Choice([None, 'simple', 'redis', 'memcached']),
|
||||
prompt='Cache type?')
|
||||
@click.option('--search-type',
|
||||
default=config.CACHE_TYPE,
|
||||
type=click.Choice(['simple', 'elasticsearch']),
|
||||
prompt='Search type?')
|
||||
@click.option('--db-uri',
|
||||
default=config.DB_URI,
|
||||
prompt='Database URI? Examples: http://goo.gl/RyW0cl')
|
||||
|
@ -106,6 +110,9 @@ def setup(ctx, **kw):
|
|||
elif conf['CACHE_TYPE'] == 'memcached':
|
||||
ctx.invoke(setup_memcached)
|
||||
|
||||
if conf['SEARCH_TYPE'] == 'elasticsearch':
|
||||
ctx.invoke(setup_elasticsearch)
|
||||
|
||||
green('Config saved to %s' % conf_path)
|
||||
|
||||
if not conf_path.startswith('/etc/realms-wiki'):
|
||||
|
@ -140,6 +147,19 @@ def setup_redis(**kw):
|
|||
install_redis()
|
||||
|
||||
|
||||
@click.command()
|
||||
@click.option('--elasticsearch-url',
|
||||
default=getattr(config, 'ELASTICSEARCH_URL', 'http://127.0.0.1:9200'),
|
||||
prompt='Elasticsearch URL')
|
||||
def setup_elasticsearch(**kw):
|
||||
conf = {}
|
||||
|
||||
for k, v in kw.items():
|
||||
conf[k.upper()] = v
|
||||
|
||||
config.update(conf)
|
||||
|
||||
|
||||
def get_prefix():
|
||||
return sys.prefix
|
||||
|
||||
|
@ -385,4 +405,4 @@ def deploy():
|
|||
call("sudo docker push realms/realms-wiki", shell=True)
|
||||
|
||||
if __name__ == '__main__':
|
||||
cli()
|
||||
cli()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue