config.sample.php 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * Site configuration. Copy this file to config.php and fill in your values.
  4. * config.php is never committed to git and never rewritten by the application.
  5. */
  6. return [
  7. // ---- Site -------------------------------------------------------------
  8. 'site' => [
  9. 'name' => 'Jane Doe Photography',
  10. // Base URL of the public site, no trailing slash. Used for links in
  11. // shared gallery URLs. Example: 'https://www.example.com'
  12. 'base_url' => 'https://www.example.com',
  13. // IANA timezone used for gallery expiry checks.
  14. 'timezone' => 'Europe/Berlin',
  15. ],
  16. // ---- Hetzner Object Storage (S3-compatible) ---------------------------
  17. // Create the bucket in the Hetzner console, keep it PRIVATE.
  18. // Endpoint depends on the location, e.g. fsn1/nbg1/hel1.
  19. 's3' => [
  20. 'endpoint' => 'https://fsn1.your-objectstorage.com',
  21. 'region' => 'fsn1',
  22. 'bucket' => 'my-photo-galleries',
  23. 'access_key' => 'CHANGE_ME',
  24. 'secret_key' => 'CHANGE_ME',
  25. // Bucket addressing. true → https://<endpoint-host>/<bucket>/<key>
  26. // (path-style, recommended for Hetzner). false → virtual-hosted-style
  27. // https://<bucket>.<endpoint-host>/<key>, which needs the bucket to
  28. // resolve as a TLS subdomain of the endpoint.
  29. 'path_style' => true,
  30. // Key prefix under which gallery objects are stored:
  31. // <prefix>/<slug>/originals/... and .../thumbs/... Set to '' to store
  32. // galleries at the bucket root.
  33. 'prefix' => 'galleries',
  34. // Lifetime of presigned GET URLs (seconds). Gallery pages embed these;
  35. // after expiry the browser must reload the page for fresh URLs.
  36. 'url_ttl' => 3600,
  37. ],
  38. // ---- Uploads ----------------------------------------------------------
  39. 'uploads' => [
  40. // Longest edge of the client-side generated grid thumbnails (px).
  41. // Originals are never touched.
  42. 'thumb_size' => 600,
  43. // JPEG quality for thumbnails (0.0 - 1.0, used by the browser canvas).
  44. 'thumb_quality' => 0.8,
  45. // JPEG quality for downscaled originals (0.0 - 1.0). Only applies to
  46. // galleries that set a resolution cap; "Original" galleries are never
  47. // re-encoded.
  48. 'resize_quality' => 0.9,
  49. // How many images the browser uploads at once. Each one holds a PHP
  50. // worker on the webhost for its whole S3 round trip, so keep this
  51. // below the host's per-site process limit. 1 restores serial uploads.
  52. 'concurrency' => 3,
  53. ],
  54. ];