Skip to content

Commit 2c20829

Browse files
committed
Update Dockerfile
Adicionado comando para migração
1 parent baf8766 commit 2c20829

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

backend/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,5 @@ COPY ./app /app/app
4040
RUN --mount=type=cache,target=/root/.cache/uv \
4141
uv sync
4242

43-
CMD ["fastapi", "run", "--workers", "4", "app/main.py"]
43+
# Run migrations before starting the server
44+
CMD ["sh", "-c", "alembic upgrade head && uvicorn app.main:app --host 0.0.0.0 --port ${PORT:-8000}"]

0 commit comments

Comments
 (0)