mirror of
https://github.com/Donkie/Spoolman.git
synced 2026-10-22 01:52:17 -05:00
Tidy up docker file and entrypoint
This commit is contained in:
1 parent
137558639a
commit
388082f27a
2 files changed
+7
-7
No files matched your search
+3
-4
@@ -25,9 +25,9 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
uv sync --locked --no-install-project
|
||||
|
||||
# Copy and install app
|
||||
COPY --chown=app:app migrations /home/app/spoolman/migrations
|
||||
COPY --chown=app:app spoolman /home/app/spoolman/spoolman
|
||||
COPY --chown=app:app alembic.ini README.md uv.lock pyproject.toml /home/app/spoolman/
|
||||
COPY migrations /home/app/spoolman/migrations
|
||||
COPY spoolman /home/app/spoolman/spoolman
|
||||
COPY alembic.ini README.md uv.lock pyproject.toml /home/app/spoolman/
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
uv sync --locked
|
||||
|
||||
@@ -45,7 +45,6 @@ RUN apt-get update && apt-get install -y \
|
||||
|
||||
# Add local user so we don't run as root
|
||||
RUN useradd -u 1000 -U app \
|
||||
&& usermod -G users app \
|
||||
&& mkdir -p /home/app/.local/share/spoolman \
|
||||
&& chown -R app:app /home/app/.local/share/spoolman
|
||||
|
||||
|
||||
+4
-3
@@ -21,7 +21,8 @@ if [ "$(id -g app)" -ne "$PGID" ]; then
|
||||
fi
|
||||
|
||||
if [ "$(id -u)" -eq 0 ]; then
|
||||
exec gosu "app" uvicorn spoolman.main:app --host $SPOOLMAN_HOST --port $SPOOLMAN_PORT "$@"
|
||||
else
|
||||
exec uvicorn spoolman.main:app --host $SPOOLMAN_HOST --port $SPOOLMAN_PORT "$@"
|
||||
exec gosu "app" "$0" "$@"
|
||||
# NOT REACHABLE
|
||||
fi
|
||||
|
||||
exec uvicorn spoolman.main:app --host $SPOOLMAN_HOST --port $SPOOLMAN_PORT "$@"
|
||||
Reference in new issue
Block a user