mirror of
https://github.com/DarrylNixon/ghostforge
synced 2024-04-22 06:27:20 -07:00
Preparing to setup fastapi-users
This commit is contained in:
parent
7598e2c8fc
commit
216d2ac42b
15 changed files with 266 additions and 45 deletions
15
Dockerfile
15
Dockerfile
|
@ -1,5 +1,10 @@
|
|||
FROM python:3.11-alpine
|
||||
|
||||
# argon2 needs these to build, and we need argon2 for secure password
|
||||
# hashing/salting
|
||||
RUN apk add gcc musl-dev libffi-dev
|
||||
RUN python3 -m pip install -U cffi pip setuptools
|
||||
|
||||
# Enforcement to ensure passwords environment variables are not left blank.
|
||||
# This won't stop bad passwords from being used, but at least won't cause
|
||||
# errors or, worse, weaker crypt.
|
||||
|
@ -21,9 +26,17 @@ RUN mkdir -p "${ENV_GHOSTFORGE_DATA_DIR}"
|
|||
WORKDIR /ghostforge
|
||||
COPY . .
|
||||
|
||||
# argon2 needs these to build, and we need argon2 for secure password
|
||||
# hashing/salting
|
||||
RUN apk add gcc musl-dev libffi-dev
|
||||
RUN python3 -m pip install -U cffi pip setuptools
|
||||
|
||||
# Install ghostforge from the work directory.
|
||||
RUN pip install .
|
||||
|
||||
# Reclaim space from build-time packages
|
||||
RUN apk del gcc musl-dev libffi-dev
|
||||
|
||||
# Expose the web "serve" port specific in the environment variables.
|
||||
ARG GHOSTFORGE_INTERNAL_WEB_PORT
|
||||
ENV ENV_GHOSTFORGE_INTERNAL_WEB_PORT=${GHOSTFORGE_INTERNAL_WEB_PORT}
|
||||
|
@ -34,4 +47,4 @@ EXPOSE ${ENV_GHOSTFORGE_INTERNAL_WEB_PORT}
|
|||
|
||||
# TODO: Replace with ghostforge_serve when it works.
|
||||
# This currently just keeps the container running for development.
|
||||
CMD [ "python3", "-m", "http.server" ]
|
||||
CMD ["sh", "-c", "uvicorn ghostforge.serve:gf --host 0.0.0.0 --port $GHOSTFORGE_INTERNAL_WEB_PORT"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue