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
Percy
Percy2y ago
Project ID: N/A
GULoso
GULosoOP2y ago
[start] command="flask run" - is already defined in the .toml arrquivo wouldn't that be? I'm a layman on the platform still
GULoso
GULosoOP2y ago
Brody
Brody2y ago
please reference this template https://github.com/railwayapp-templates/flask
GULoso
GULosoOP2y ago
thank you very much
Want results from more Discord servers?
Add your server