feat: run alembic patches at container start
This commit is contained in:
parent
dd39849b8d
commit
63f8a98dfa
2 changed files with 9 additions and 2 deletions
|
|
@ -18,15 +18,18 @@ RUN pip install --no-cache-dir --upgrade \
|
|||
|
||||
USER 10000:10001
|
||||
|
||||
COPY run ./
|
||||
COPY alembic.ini entrypoint.sh pyproject.toml run ./
|
||||
COPY alembic ./alembic
|
||||
COPY scripts ./scripts
|
||||
COPY unwind ./unwind
|
||||
|
||||
RUN pip install --no-cache-dir --editable .
|
||||
|
||||
ENV UNWIND_DATA="/data"
|
||||
VOLUME $UNWIND_DATA
|
||||
|
||||
ENV UNWIND_PORT=8097
|
||||
EXPOSE $UNWIND_PORT
|
||||
|
||||
ENTRYPOINT ["/var/app/run"]
|
||||
ENTRYPOINT ["/var/app/entrypoint.sh"]
|
||||
CMD ["server"]
|
||||
|
|
|
|||
4
entrypoint.sh
Executable file
4
entrypoint.sh
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh -eu
|
||||
|
||||
alembic upgrade head
|
||||
exec ./run "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue