From fdf3289f5438f3a2c537ae4a43ec2f75eb25e697 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sat, 22 Aug 2026 22:08:05 +0200 Subject: [PATCH] Remove lograge configuration from Docker image and production --- Dockerfile | 14 ++++++-------- config/environments/production.rb | 9 --------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index 177771d..91a0c7c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ ARG BUN_VERSION=1.3.9 # --- Stage 1: Grab Node.js Binaries --- # We use the official image as a source for pre-compiled binaries -FROM docker.io/library/node:${NODE_VERSION}-slim AS node_source +FROM docker.io/library/node:${NODE_VERSION} AS node_source # --- Stage 2: Base (Runtime Environment) --- FROM docker.io/library/ruby:${RUBY_VERSION}-slim AS base @@ -36,15 +36,13 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ apt-get update -qq && \ apt-get install --no-install-recommends -y \ - build-essential git libyaml-dev node-gyp pkg-config python-is-python3 + build-essential git libyaml-dev pkg-config python-is-python3 -# "Heist" Node.js and npm from the node_source stage (build-time only) -COPY --from=node_source /usr/local/bin/node /usr/local/bin/node -COPY --from=node_source /usr/local/lib/node_modules /usr/local/lib/node_modules +# Install Node.js and npm from node_source +COPY --from=node_source /usr/local/ /usr/local/ -# Re-link npm and install Bun (build-time only) -RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm && \ - npm install -g bun@${BUN_VERSION} +# Install Bun +RUN npm install -g bun@${BUN_VERSION} # 1. Install Gems (Separate COPY for maximum caching) COPY Gemfile Gemfile.lock ./ diff --git a/config/environments/production.rb b/config/environments/production.rb index ced9b3c..b1c0f32 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -37,15 +37,6 @@ Rails.application.configure do config.log_tags = [:request_id] config.logger = ActiveSupport::TaggedLogging.logger(STDOUT) - # Lograge - structured request logging - config.lograge.enabled = true - config.lograge.custom_options = lambda do |event| - { - request_id: event.payload[:request_id], - user_id: event.payload[:user_id] - } - end - # Change to "debug" to log everything (including potentially personally-identifiable information!). config.log_level = ENV.fetch('RAILS_LOG_LEVEL', 'info')