If I run my flask app with pm2, I get rendered a website without any consideration of css and images etc.
My flask app looks like this:
from flask import Flask, render_template
app = Flask(__name__)
app.secret_key='fiujhdfjksdjkfbskfbd'
@app.route("/")
def index_page():
return render_template('index.html')
if __name__ == "__main__":
app.run(host='0.0.0.0', port='8080')
Into /etc/nginx/sites-available/default
I wrote the following:
server {
listen 80;
listen [::]:80;
server_name www.mydomain.com mydomain.com;
location / {
proxy_pass http://0.0.0.0:8000;
}
}
And into the start file I wrote this:
source venv/bin/activate
gunicorn -w 10 flask_app:app
And then I start it with pm2 start start_script
Does anybody know what is wrong?