updated dockerfile, spacing adjustments
This commit is contained in:
parent
b757ceff57
commit
6c7095ec5a
|
@ -9,11 +9,11 @@ author "scragg@gmail.com"
|
|||
|
||||
chdir /home/deploy/realms-wiki
|
||||
|
||||
env PATH=/home/deploy/realms-wiki/.venv/bin:/usr/local/bin:/usr/bin:/bin:$PATH
|
||||
PATH=/home/deploy/realms-wiki/.venv/bin:/usr/local/bin:/usr/bin:/bin:$PATH
|
||||
export PATH
|
||||
|
||||
env LC_ALL=en_US.UTF-8
|
||||
env GEVENT_RESOLVER=ares
|
||||
LC_ALL=en_US.UTF-8
|
||||
GEVENT_RESOLVER=ares
|
||||
|
||||
export LC_ALL
|
||||
export GEVENT_RESOLVER
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -97,6 +97,7 @@ def to_canonical(s):
|
|||
s = s.lower()
|
||||
return s
|
||||
|
||||
|
||||
def cname_to_filename(cname):
|
||||
""" Convert canonical name to filename
|
||||
|
||||
|
@ -117,6 +118,7 @@ def filename_to_cname(filename):
|
|||
"""
|
||||
return os.path.splitext(filename)[0]
|
||||
|
||||
|
||||
def gravatar_url(email):
|
||||
return "//www.gravatar.com/avatar/" + hashlib.md5(email).hexdigest()
|
||||
|
||||
|
|
|
@ -15,5 +15,3 @@ class RegistrationForm(Form):
|
|||
class LoginForm(Form):
|
||||
email = StringField('Email', [validators.DataRequired()])
|
||||
password = PasswordField('Password', [validators.DataRequired()])
|
||||
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
__version__ = '0.5.1'
|
||||
__version__ = '0.5.2'
|
||||
|
|
Loading…
Reference in a new issue