Fixes in installation

This commit is contained in:
Antonio de la Rosa 2018-01-26 23:35:43 +01:00
parent 7b7a45debf
commit e16484600c
3 changed files with 8 additions and 21 deletions

View file

@ -26,15 +26,13 @@ def start():
# Options for deploy # Options for deploy
parser.add_argument('--domain', help='The base domain for this site', required=True) parser.add_argument('--url', help='The http/https base url of the real proxy server. Example: https://www.exampledomain.com, default is http://localhost:8080', required=False)
parser.add_argument('--folder', help='If you deploy in a subdirectory, set it, without beggining and ending slashes', required=False) parser.add_argument('--folder', help='If you deploy in a subdirectory, set it, without beggining and ending slashes', required=False)
parser.add_argument('--host', help='The host ip or domain where the app is binded', required=False) parser.add_argument('--host', help='The host ip or domain where the app is binded', required=False)
parser.add_argument('--port', help='Change the default port 8080 to other number. Use 80 is not recommended, use 80 for the principal server how nginx or apache', required=False) parser.add_argument('--port', help='Change the default port 8080 to other number. Use 80 is not recommended, use 80 for the proxy server how nginx or apache', required=False)
parser.add_argument('--ssl', help='If the site use ssl, set it', action='store_true')
args=parser.parse_args() args=parser.parse_args()
@ -147,7 +145,7 @@ def start():
#domain='localhost' #domain='localhost'
conf=conf.replace("domain='localhost'", "domain='"+args.domain+"'") #conf=conf.replace("domain='localhost'", "domain='"+args.url+"'")
if args.host==None: if args.host==None:
args.host='localhost' args.host='localhost'
@ -156,13 +154,7 @@ def start():
if args.port==None: if args.port==None:
args.port='8080' args.port='8080'
port_deploy=':8080'
elif args.port=='80':
port_deploy=''
else:
port_deploy=':'+args.port
conf=conf.replace("port=8080", "port="+args.port) conf=conf.replace("port=8080", "port="+args.port)
@ -171,18 +163,15 @@ def start():
if args.folder==None: if args.folder==None:
args.folder='' args.folder=''
else: else:
args.folder='/'+args.folder #args.folder='/'+args.folder
base_url='/'+args.folder+'/' base_url='/'+args.folder+'/'
conf=conf.replace("base_url='/'", "base_url='"+base_url+"'") conf=conf.replace("base_url='/'", "base_url='"+base_url+"'")
arg_ssl='http'
if args.ssl==True: if args.url==None:
arg_ssl='https' args.url='http://localhost:8080'
domain_url=arg_ssl+'://'+args.domain+port_deploy+args.folder domain_url=args.url
conf=conf.replace("domain_url='http://localhost:8080'", "domain_url='"+domain_url+"'") conf=conf.replace("domain_url='http://localhost:8080'", "domain_url='"+domain_url+"'")

View file

@ -346,7 +346,7 @@ def login():
@app.post('/'+config.admin_folder+'/register') @app.post('/'+config.admin_folder+'/register')
def register(): def register():
print('pepe')
getpostfiles=GetPostFiles() getpostfiles=GetPostFiles()
connection=WebModel.connection() connection=WebModel.connection()

View file

@ -61,8 +61,6 @@ session_enabled=True
cookie_name = 'paramecio.session' cookie_name = 'paramecio.session'
domain='localhost'
domain_url='http://localhost:8080' domain_url='http://localhost:8080'
#Keep this variable and don't show to anybody #Keep this variable and don't show to anybody