Skip to content

Commit

Permalink
feat: update to 3.10.2 and fews issues on logs and db (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-ssd authored Dec 27, 2024
2 parents 11a58ea + af35fb5 commit 837d396
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ jobs:
platforms: linux/amd64,linux/arm64
push: true
python_base_image: 3.12.7-slim-bullseye
pi_version: '3.10.1'
pi_version: '3.10.2'
is_default_version: true
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG BASE_IMAGE_TAG=3.12.7-slim-bullseye
ARG PI_VERSION=3.10.1
ARG PI_VERSION=3.10.2
ARG PI_HOME=/opt/privacyidea

FROM python:$BASE_IMAGE_TAG AS builder
Expand Down Expand Up @@ -29,8 +29,8 @@ ENV PI_SKIP_BOOTSTRAP=false \
COPY prebuildfs /
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN install_packages ca-certificates gettext-base tini tree jq libpq5 realmd krb5-user curl && \
mkdir -p "$PI_DATA_DIR" "$PI_CFG_DIR" && \
chown -R nobody:nogroup "$PI_DATA_DIR" "$PI_CFG_DIR"
mkdir -p "$PI_DATA_DIR" "$PI_CFG_DIR" /var/log/privacyidea && \
chown -R nobody:nogroup "$PI_DATA_DIR" "$PI_CFG_DIR" /var/log/privacyidea
USER nobody
WORKDIR "$PI_HOME"
COPY --from=builder /opt/privacyidea .
Expand Down
14 changes: 9 additions & 5 deletions rootfs/opt/privacyidea/pi-logging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ handlers:
class: logging.StreamHandler
level: INFO
formatter: detail
file:
# Rollover the logfile at midnight
class: logging.handlers.RotatingFileHandler
backupCount: 5
maxBytes: 1000000
formatter: detail
level: INFO
filename: /var/log/privacyidea/privacyidea.log

loggers:
privacyidea:
level: INFO
handlers: [console]

root:
level: WARNING
handlers: [console]
handlers: [file]
3 changes: 2 additions & 1 deletion rootfs/opt/templates/pi-config.template
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ if PI_PEPPER is None:
SUPERUSER_REALM = os.environ.get('PI_SUPERUSER_REALM','administrator').split(',')

SQLALCHEMY_DATABASE_URI = "$SQLALCHEMY_DATABASE_URI"
SQLALCHEMY_ENGINE_OPTIONS = {"pool_pre_ping": True, "pool_recycle": 3600, "pool_size":10, "pool_timeout": 30, "max_overflow": 20}
# Update SQLALCHEMY_ENGINE_OPTIONS accordingly to your needs
# SQLALCHEMY_ENGINE_OPTIONS = {"pool_pre_ping": True, "pool_recycle": 3600, "pool_size":10, "pool_timeout": 30, "max_overflow": 20}
PI_ENCFILE = os.environ.get("PI_ENCFILE", "/data/privacyidea/keys/encfile")
PI_HSM = os.environ.get("PI_HSM", "default")
PI_AUDIT_NO_SIGN = os.environ.get("PI_AUDIT_NO_SIGN", "False").lower() == "true"
Expand Down

0 comments on commit 837d396

Please sign in to comment.