feat: run alembic patches at container start

This commit is contained in:
ducklet 2024-05-20 16:52:37 +02:00
parent dd39849b8d
commit 63f8a98dfa
2 changed files with 9 additions and 2 deletions

View file

@ -18,15 +18,18 @@ RUN pip install --no-cache-dir --upgrade \
USER 10000:10001 USER 10000:10001
COPY run ./ COPY alembic.ini entrypoint.sh pyproject.toml run ./
COPY alembic ./alembic
COPY scripts ./scripts COPY scripts ./scripts
COPY unwind ./unwind COPY unwind ./unwind
RUN pip install --no-cache-dir --editable .
ENV UNWIND_DATA="/data" ENV UNWIND_DATA="/data"
VOLUME $UNWIND_DATA VOLUME $UNWIND_DATA
ENV UNWIND_PORT=8097 ENV UNWIND_PORT=8097
EXPOSE $UNWIND_PORT EXPOSE $UNWIND_PORT
ENTRYPOINT ["/var/app/run"] ENTRYPOINT ["/var/app/entrypoint.sh"]
CMD ["server"] CMD ["server"]

4
entrypoint.sh Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh -eu
alembic upgrade head
exec ./run "$@"