mirror of
https://github.com/Donkie/Spoolman.git
synced 2026-10-22 01:52:17 -05:00
Added a basic dockerfile
This commit is contained in:
1 parent
b51d0a3183
commit
77ffab61c5
3 files changed
+19
No files matched your search
@@ -0,0 +1,2 @@
|
||||
.git
|
||||
Dockerfile
|
||||
@@ -196,3 +196,4 @@ $RECYCLE.BIN/
|
||||
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
.python-version
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
FROM python:3.11-alpine
|
||||
|
||||
# Add local user so we don't run as root
|
||||
RUN adduser -D app
|
||||
USER app
|
||||
|
||||
ENV PATH="/home/app/.local/bin:${PATH}"
|
||||
|
||||
# Copy and install app
|
||||
COPY --chown=app:app ./ /home/app/spoolman/
|
||||
WORKDIR /home/app/spoolman
|
||||
RUN pip install --user .
|
||||
|
||||
# Run command
|
||||
EXPOSE 8000
|
||||
CMD ["uvicorn", "spoolman.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
Reference in new issue
Block a user