Moved database migrations to run.sh script.
This commit is contained in:
@@ -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"]
|
||||||
|
|||||||
@@ -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
|
||||||
Reference in New Issue
Block a user