Run migrations via entrypoint (alembic upgrade head) instead of nested asyncio.run in startup hook
Some checks failed
build-and-deploy / build (push) Failing after 16s
Some checks failed
build-and-deploy / build (push) Failing after 16s
This commit is contained in:
parent
985fedec7b
commit
0a6da2f9c1
3 changed files with 17 additions and 6 deletions
|
|
@ -12,7 +12,8 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|||
COPY app/ ./app/
|
||||
COPY alembic.ini ./alembic.ini
|
||||
COPY alembic/ ./alembic/
|
||||
RUN chmod +x /app/app/docker-entrypoint.sh
|
||||
|
||||
EXPOSE 8000
|
||||
ENV PYTHONPATH=/app/app
|
||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
ENTRYPOINT ["/app/app/docker-entrypoint.sh"]
|
||||
|
|
|
|||
Loading…
Reference in a new issue