Umstellung auf podman in Arbeit
(cherry picked from commit 1a92c63ef6d60e9dcba513ebf60cbd9f18a142e8)
This commit is contained in:
@@ -20,25 +20,8 @@ RUN uv sync
|
||||
# ------------------------------- Production Stage ------------------------------ ##
|
||||
FROM python:3.13-slim-bookworm AS production
|
||||
|
||||
# The following secrets are available during build time
|
||||
#RUN --mount=type=secret,id=DB_PASSWORD \
|
||||
# --mount=type=secret,id=DB_USER \
|
||||
# --mount=type=secret,id=DB_NAME \
|
||||
# --mount=type=secret,id=DB_HOST \
|
||||
# --mount=type=secret,id=DB_PORT \
|
||||
# DB_PASSWORD=/run/secrets/DB_PASSWORD \
|
||||
# DB_USER=$(cat /run/secrets/DB_USER) \
|
||||
# DB_NAME=$(cat /run/secrets/DB_NAME) \
|
||||
# DB_HOST=$(cat /run/secrets/DB_HOST) \
|
||||
# DB_PORT=$(cat /run/secrets/DB_PORT)
|
||||
|
||||
#RUN --mount=type=secret,id=secret-key,target=secrets.json
|
||||
|
||||
RUN apt-get update && apt-get install --no-install-recommends -y curl
|
||||
|
||||
RUN useradd --create-home appuser
|
||||
USER appuser
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY /src src
|
||||
@@ -48,8 +31,8 @@ COPY --from=builder /app/.venv .venv
|
||||
ENV PATH="/app/.venv/bin:$PATH"
|
||||
|
||||
# Expose the specified port for FastAPI
|
||||
EXPOSE $PORT
|
||||
EXPOSE 8200
|
||||
|
||||
# Start the application with Uvicorn in production mode, using environment variable references
|
||||
CMD ["uvicorn", "src.main:kontor", "--log-level", "info", "--host", "0.0.0.0" , "--port", "8500"]
|
||||
CMD ["uvicorn", "src.main:kontor", "--log-level", "info", "--host", "0.0.0.0" , "--port", "8200"]
|
||||
|
||||
@@ -9,7 +9,7 @@ load_dotenv(dotenv_path=env_path)
|
||||
|
||||
class Settings:
|
||||
PROJECT_NAME: str = "Kontor"
|
||||
PROJECT_VERSION: str = "0.2.0"
|
||||
PROJECT_VERSION: str = "0.3.0"
|
||||
|
||||
DB_USER: str = os.getenv("DB_USER", "kontor")
|
||||
DB_PASSWORD: str = os.getenv("DB_PASSWORD", "kontor")
|
||||
|
||||
Reference in New Issue
Block a user