Skip to content
Permalink
Browse files

feat: ask if volume exists

closes #9
  • Loading branch information...
etienne-napoleone committed Mar 13, 2019
1 parent 2b5344d commit de35f210f2f6336707a840b3478771a9439dbb92
Showing with 9 additions and 2 deletions.
  1. +5 −1 create_tomochain_masternode/main.py
  2. +4 −1 create_tomochain_masternode/templates/compose.py
@@ -104,8 +104,12 @@ def ask() -> Dict[str, str]:
exists=True,
file_okay=False,
resolve_path=True,
) if answers["storage"] == 'host directory' else click.STRING
) if answers['storage'] == 'host directory' else click.STRING
)
if answers['storage'] == 'docker volume':
answers['external'] = str(click.confirm(
f'{bullet} The volume already exists',
))
answers['expose_rpc'] = click.confirm(
f'{bullet} Expose RPC',
)
@@ -26,9 +26,12 @@
{%- endif %}
restart: always
{% if storage == "docker volume" -%}
{%- if storage == "docker volume" -%}
volumes:
{{ data }}:
{%- if external == "True" %}
external: true
{%- endif %}
{%- endif %}
"""

0 comments on commit de35f21

Please sign in to comment.
You can’t perform that action at this time.