Skip to content

Commit 9b22480

Browse files
committed
Update Dockerfile
1 parent 2c20829 commit 9b22480

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

backend/Dockerfile

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

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}"]
43+
# Run migrations and create superuser before starting the server
44+
CMD ["sh", "-c", "alembic upgrade head && python -c 'from app.main import create_superuser; create_superuser()' && uvicorn app.main:app --host 0.0.0.0 --port ${PORT:-8000}"]

0 commit comments

Comments
 (0)