config.sample.php 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. // Manage server configuration.
  3. //
  4. // Copy this file to config.php on the server and adjust the values.
  5. // config.php is not tracked in Git (.gitignore).
  6. //
  7. // Every constant below has a default in includes/bootstrap.php, so a minimal
  8. // config.php only needs MANAGE_PUBLIC_URL and MANAGE_ADMIN_PASSWORD_HASH.
  9. // ---------------------------------------------------------------------------
  10. // Product
  11. // ---------------------------------------------------------------------------
  12. // One manage deployment serves exactly one product. Deploy it again for another.
  13. define("MANAGE_PRODUCT_NAME", "Example Orderform");
  14. // Prefix for stored release packages: <prefix>-vX.Y.Z.zip
  15. define("MANAGE_PACKAGE_PREFIX", "example-orderform");
  16. // ---------------------------------------------------------------------------
  17. // Public URL
  18. // ---------------------------------------------------------------------------
  19. // Absolute base URL of this installation without a trailing slash. The package
  20. // download URL handed to clients is built from this value, never from the
  21. // client-controlled Host header.
  22. define("MANAGE_PUBLIC_URL", "https://manage.example.org");
  23. // ---------------------------------------------------------------------------
  24. // Admin login
  25. // ---------------------------------------------------------------------------
  26. // Generate a hash with:
  27. // php -r 'echo password_hash("your-password", PASSWORD_DEFAULT), PHP_EOL;'
  28. define("MANAGE_ADMIN_PASSWORD_HASH", '$2y$12$replace-this-with-a-real-hash');
  29. // Plaintext fallback for a quick first start. Prefer the hash above.
  30. // define("MANAGE_ADMIN_PASSWORD", "change-me");
  31. // ---------------------------------------------------------------------------
  32. // Storage
  33. // ---------------------------------------------------------------------------
  34. define("MANAGE_STORAGE_DIR", __DIR__ . "/storage/");
  35. // ---------------------------------------------------------------------------
  36. // Backups
  37. // ---------------------------------------------------------------------------
  38. // Local backups kept per instance. The UI value in storage/settings.json takes
  39. // precedence once it has been saved. Minimum 1.
  40. define("MANAGE_BACKUP_RETENTION", 30);
  41. // Maximum accepted upload size in bytes (0 disables the check). PHP's own
  42. // upload_max_filesize / post_max_size still apply and are usually lower.
  43. define("MANAGE_BACKUP_MAX_UPLOAD_BYTES", 0);
  44. // ---------------------------------------------------------------------------
  45. // S3 archive (optional)
  46. // ---------------------------------------------------------------------------
  47. // When enabled, every received backup is additionally archived to S3-compatible
  48. // object storage. Local disk then acts as a hot cache holding the newest copies.
  49. define("MANAGE_S3_ENABLED", false);
  50. define("MANAGE_S3_ENDPOINT", "https://fsn1.your-objectstorage.com");
  51. define("MANAGE_S3_REGION", "fsn1");
  52. define("MANAGE_S3_BUCKET", "");
  53. define("MANAGE_S3_PREFIX", "manage-backups");
  54. define("MANAGE_S3_ACCESS_KEY", "");
  55. define("MANAGE_S3_SECRET_KEY", "");
  56. // false = virtual-hosted (https://<bucket>.<endpoint>/<key>), the default for
  57. // Hetzner and most providers. true = path-style (https://<endpoint>/<bucket>/<key>).
  58. define("MANAGE_S3_PATH_STYLE", false);
  59. define("MANAGE_S3_TIMEOUT", 120);
  60. define("MANAGE_S3_RETENTION", 365);
  61. // ---------------------------------------------------------------------------
  62. // Rate limits
  63. // ---------------------------------------------------------------------------
  64. define("MANAGE_LOGIN_RATE_LIMIT_MAX", 10);
  65. define("MANAGE_LOGIN_RATE_LIMIT_WINDOW", 900);
  66. define("MANAGE_API_RATE_LIMIT_MAX", 240);
  67. define("MANAGE_API_RATE_LIMIT_WINDOW", 300);
  68. // ---------------------------------------------------------------------------
  69. // Log retention
  70. // ---------------------------------------------------------------------------
  71. define("MANAGE_LOG_MAX_BYTES", 1048576);
  72. define("MANAGE_LOG_KEEP_FILES", 5);
  73. define("MANAGE_LOG_MAX_AGE_SECONDS", 2592000);