setup kontor-schema
This commit is contained in:
+12
-11
@@ -22,18 +22,18 @@ RUN uv sync
|
||||
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=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 --mount=type=secret,id=secret-key,target=secrets.json
|
||||
|
||||
RUN useradd --create-home appuser
|
||||
USER appuser
|
||||
@@ -42,6 +42,7 @@ WORKDIR /app
|
||||
|
||||
COPY /src src
|
||||
COPY --from=builder /app/.venv .venv
|
||||
COPY --from=builder /usr/lib/x86_64-linux-gnu/libmariadb.so.3 /usr/lib/x86_64-linux-gnu
|
||||
|
||||
# Set up environment variables for production
|
||||
ENV PATH="/app/.venv/bin:$PATH"
|
||||
|
||||
Reference in New Issue
Block a user