I can't deploy flask
project ID: https://discord.com/channels/713503345364697088/1123340075145629828
I'm experiencing a problem deploying a flask app on the platform.
This is my railway.toml file:
[build]
command = "pip install -r requirements.txt"
[deploy]
command = "gunicorn run:app"
[start]
command = "flask run"
This is my run.py file:
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_wtf.csrf import CSRFProtect
import os
app = Flask(name)
app.config.from_pyfile('config.py')
db = SQLAlchemy(app)
csrf = CSRFProtect(app)
#instanciando arquivos de rotas
from app.rotas.estatistica import *
from app.rotas.formulario import *
from app.rotas.gerenciador import *
from app.rotas.index import *
from app.rotas.login import *
if name == 'main':
app.run(debug=True, port=os.getenv("PORT", default=5000))#config de servidor railwayy
environment variable:
...
error:
5 Replies
Project ID:
N/A
[start]
command="flask run" - is already defined in the .toml arrquivo wouldn't that be? I'm a layman on the platform still
please reference this template
https://github.com/railwayapp-templates/flask
thank you very much