This commit is contained in:
Justin Lex-Hammarskjöld 2025-11-03 01:08:28 -06:00 committed by GitHub
commit 30a621b141
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 13 additions and 4 deletions

View file

@ -99,5 +99,7 @@ Rails.application.configure do
config.lograge.enabled = true
config.lograge.formatter = Lograge::Formatters::Json.new
config.active_storage.service = ENV['SELF_HOSTED'] == 'true' ? :local : :s3
# Store uploaded files either on the local file system or in S3-compatible object storage
# (see config/storage.yml for options).
config.active_storage.service = ENV.fetch('STORAGE_BACKEND', local)
end

View file

@ -42,8 +42,9 @@ Rails.application.configure do
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
# config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
# Store uploaded files on the local file system (see config/storage.yml for options).
config.active_storage.service = ENV['SELF_HOSTED'] == 'true' ? :local : :s3
# Store uploaded files either on the local file system or in S3-compatible object storage
# (see config/storage.yml for options).
config.active_storage.service = ENV.fetch('STORAGE_BACKEND', local)
config.silence_healthcheck_path = '/api/v1/health'

View file

@ -7,13 +7,14 @@ local:
root: <%= Rails.root.join("storage") %>
# Only load S3 config if not in test environment
<% if !Rails.env.test? && ENV['AWS_ACCESS_KEY_ID'] && ENV['AWS_SECRET_ACCESS_KEY'] && ENV['AWS_REGION'] && ENV['AWS_BUCKET'] %>
<% if !Rails.env.test? && ENV['AWS_ACCESS_KEY_ID'] && ENV['AWS_SECRET_ACCESS_KEY'] && ENV['AWS_REGION'] && ENV['AWS_BUCKET'] && ENV['AWS_ENDPOINT_URL'] %>
s3:
service: S3
access_key_id: <%= ENV.fetch("AWS_ACCESS_KEY_ID") %>
secret_access_key: <%= ENV.fetch("AWS_SECRET_ACCESS_KEY") %>
region: <%= ENV.fetch("AWS_REGION") %>
bucket: <%= ENV.fetch("AWS_BUCKET") %>
endpoint: <%= ENV.fetch("AWS_ENDPOINT_URL") %>
<% end %>
# Remember not to checkin your GCS keyfile to a repository

View file

@ -160,6 +160,11 @@ spec:
value: photon.komoot.io
- name: PHOTON_API_USE_HTTPS
value: "true"
# If you have s3-compatible object storage, (e.g. minio or ceph),
# you can set this to "s3" and set the necessary "AWS_" environment variables
# to use s3 storage for imports and exports
- name: STORAGE_BACKEND
value: "local"
image: freikin/dawarich:latest
imagePullPolicy: Always
volumeMounts: