Started handling nginx config

This commit is contained in:
Mike Young
2019-12-28 17:38:56 -05:00
parent 1e33d5f533
commit f23a05a9db
3 changed files with 232 additions and 34 deletions

View File

@@ -1,5 +1,7 @@
from __future__ import unicode_literals
import os
from prompt_toolkit import prompt as prm
@@ -16,39 +18,60 @@ class TerminalDisplay:
def installer(self):
questions = [
{
"message": "Input the absolute path to your ebooks\nEnter for default \"~/Books\" > ",
"message": 'Input the absolute path to your ebooks\nEnter for default "~/Books" > ',
"options": "",
"name": "BOOKPATH",
"answer": None,
"default": self.home+"/Books"
"default": self.home + "/Books",
},
{
"message": "Input your PostgreSQL server ip\nEnter for default \"localhost\" > ",
"message": 'Input your PostgreSQL server ip\nEnter for default "localhost" > ',
"options": "localhost",
"name": "DB_HOST",
"answer": None,
"default": "localhost"
"default": "localhost",
},
{
"message": "Input your PostgreSQL server port\nEnter for default \"5432\" > ",
"message": 'Input your PostgreSQL server port\nEnter for default "5432" > ',
"options": "5432",
"name": "DB_PORT",
"answer": None,
"default": "5432"
"default": "5432",
},
{
"message": "Input your PostgreSQL user name\nEnter for default \"pyshelf\" > ",
"message": 'Input your PostgreSQL user name\nEnter for default "pyshelf" > ',
"options": "pyshelf",
"name": "USER",
"answer": None,
"default": "pyshelf"
"default": "pyshelf",
},
{
"message": "Input your PostgreSQL password\nEnter for default \"pyshelf\" > ",
"message": 'Input your PostgreSQL password\nEnter for default "pyshelf" > ',
"options": "pyshelf",
"name": "PASSWORD",
"answer": None,
"default": "pyshelf"
"default": "pyshelf",
},
{
"message": 'Web ui hostname/ip\nEnter for default "localhost" > ',
"options": "localhost",
"name": "hostname",
"answer": None,
"default": "localhost",
},
{
"message": 'Web ui port\nEnter for default "8000" > ',
"options": "8000",
"name": "webport",
"answer": None,
"default": "8000",
},
{
"message": 'wsgi port\nEnter for default "8001"\n"You should probably leave this alone, unless you know what you\'re doing" > ',
"options": "8001",
"name": "wsgiport",
"answer": None,
"default": "8001",
},
]
return self.prompt(questions)