asxpio/lib
Sergei Poljanski 0dc31fbafe
storage: S3 client wrapper and admin Basic-auth middleware
S3 module wraps aws-sdk-s3 against MinIO. Two clients on purpose:

- The bytes-mover client points at S3_ENDPOINT (internal minio:9000 over
  the storage Docker network).
- The presign-only client points at S3_PUBLIC_ENDPOINT (https://s3.asxp.io
  via Traefik) so the URLs it mints resolve from a browser.

force_path_style on both because subdomain-style URLs would require wildcard
DNS under s3.asxp.io.

AdminAuth is a tiny Rack middleware that 401s any request under /admin
unless HTTP Basic credentials match ADMIN_USER / ADMIN_PASSWORD from env.
Fails closed if either env var is missing.
2026-05-26 17:43:48 +03:00
..
admin_auth.rb storage: S3 client wrapper and admin Basic-auth middleware 2026-05-26 17:43:48 +03:00
db.rb db: connection helper and invoices migration 2026-05-26 17:43:18 +03:00
invoice.rb invoicing: Invoice model with number allocation and totals 2026-05-26 17:43:28 +03:00
invoice_pdf.rb invoicing: Prawn PDF renderer with Noto fonts 2026-05-26 17:43:38 +03:00
mailer.rb useful icon and links 2026-05-05 00:57:11 +04:00
rate_limit.rb ruby rework with contact form 2026-05-05 00:45:27 +04:00
s3.rb storage: S3 client wrapper and admin Basic-auth middleware 2026-05-26 17:43:48 +03:00