Skip to content

Commit 9dd56ba

Browse files
committed
mudanças no dockfile para fazer o deploy no railway funcionar
1 parent d67ec20 commit 9dd56ba

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@ COPY . .
2121
# Criar diretórios necessários (logs, uploads)
2222
RUN mkdir -p logs uploads/documentos
2323

24-
# Expor porta padrão do Flask
24+
# Expor porta padrão para o Railway (usa variável de ambiente PORT)
2525
EXPOSE 5000
2626

27-
# Definir variáveis de ambiente
27+
# Definir variáveis de ambiente padrão
2828
ENV FLASK_APP=src/main.py
2929
ENV FLASK_RUN_HOST=0.0.0.0
30+
ENV PYTHONUNBUFFERED=1
3031

31-
# Executar migrations automaticamente e iniciar aplicação com Gunicorn
32+
# Comando de entrada: executa migrations e inicia Gunicorn
3233
CMD flask db upgrade && gunicorn src.main:app --bind 0.0.0.0:${PORT:-5000}

0 commit comments

Comments
 (0)