2016-04-20 6 views
1

Könnte mir bitte jeder helfen!MkDocs mit Python auf Gunicorn bereitstellen

Ich habe ein Problem mit MkDocs mit meinem vorhandenen Python-Projekt in nginx und gunicorn bereitstellen.

Problem ist:

If I use python run.py it's working fine, but I use supervisor gunicorn it's not work.

Python-Skript:

docs = os.path.join(os.path.dirname(os.path.abspath(__file__)), "site") 

@app.route('/app/docs/', methods=['GET']) 
@app.route('/app/docs/<path:path>', methods=['GET'], defaults={'path': None}) 
@app.route('/app/docs/<path:path>', methods=['GET']) 
def static_proxy(path=''): 
    if path[-3:] not in ['css', '.js', 'png']: 
     path = os.path.join(path,'index.html') 

    return send_from_directory(docs, path) 

jede mögliche Hilfe bitte?

Antwort

0

Jetzt behoben. Lolz.

Bevor ich dieses Skript in run.py legte es nicht auf @ app.route ('app/docs'), dann habe ich es in andere Datei verschoben .py es funktioniert gut!