diff --git a/Dockerfile b/Dockerfile index 66014c6..1571d75 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..7df7daa --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,4 @@ +#!/bin/sh -eu + +alembic upgrade head +exec ./run "$@"