Moved database migrations to run.sh script.

This commit is contained in:
2025-04-06 12:47:42 +03:00
parent 678af03cd5
commit 58aac85758
2 changed files with 3 additions and 4 deletions

View File

@@ -23,9 +23,7 @@ RUN pip install --upgrade pip && pip install --no-cache-dir -r /tmp/requirements
COPY . . COPY . .
RUN rm files/db.sqlite -f # RUN /usr/local/bin/alembic -c alembic/alembic.ini upgrade head
RUN /usr/local/bin/alembic -c alembic/alembic.ini upgrade head
# Change ownership to the new user # Change ownership to the new user
RUN chown -R appuser:appuser /app RUN chown -R appuser:appuser /app
@@ -34,4 +32,4 @@ RUN chown -R appuser:appuser /app
USER appuser USER appuser
CMD ["bash", "/app/scripts/run.sh"] ENTRYPOINT ["/app/scripts/run.sh"]

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
alembic -c alembic/alembic.ini upgrade head
uvicorn main:app --host $API_HOST --port $API_PORT uvicorn main:app --host $API_HOST --port $API_PORT