Files
ServerKit/backend/app/paths.py
T
Juan DenisandClaude Opus 4.8 6b35bb996d feat(wordpress): global plugin library for operator-owned plugins
Register WordPress plugins from GitHub repos or local paths in a global
library, then install or update them across any managed WP site from one
place. The per-site Plugins tab gains a "managed" badge and an
"update from library" action.

- models: WordPressCustomPlugin (library) + WordPressSitePlugin (installs)
- service: WordPressPluginLibraryService - sync, install, update, scan,
  with a per-slug cache dir under paths.SERVERKIT_CACHE_DIR
- api: /plugins/library CRUD + sync/install/bulk-update on wordpress_bp
- migration 041_wordpress_plugin_library
- frontend: WordPressPluginLibrary page + "Plugin Library" tab; managed
  badges and library-update action in PluginsTab
- tests: test_wp_plugin_library

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 01:08:42 -04:00

27 lines
1.3 KiB
Python

import os
# Base directories (override via env vars; defaults = production)
SERVERKIT_DIR = os.environ.get('SERVERKIT_DIR', '/var/serverkit')
SERVERKIT_CONFIG_DIR = os.environ.get('SERVERKIT_CONFIG_DIR', '/etc/serverkit')
SERVERKIT_LOG_DIR = os.environ.get('SERVERKIT_LOG_DIR', '/var/log/serverkit')
SERVERKIT_BACKUP_DIR = os.environ.get('SERVERKIT_BACKUP_DIR', '/var/backups/serverkit')
SERVERKIT_CACHE_DIR = os.environ.get('SERVERKIT_CACHE_DIR', '/var/cache/serverkit')
SERVERKIT_QUARANTINE_DIR = os.environ.get('SERVERKIT_QUARANTINE_DIR', '/var/quarantine')
# Derived paths
APPS_DIR = os.path.join(SERVERKIT_DIR, 'apps')
DEPLOYMENTS_DIR = os.path.join(SERVERKIT_DIR, 'deployments')
TEMPLATES_DIR = os.path.join(SERVERKIT_CONFIG_DIR, 'templates')
BUILD_LOG_DIR = os.path.join(SERVERKIT_LOG_DIR, 'builds')
BUILD_CACHE_DIR = os.path.join(SERVERKIT_CACHE_DIR, 'builds')
WP_PLUGIN_CACHE_DIR = os.path.join(SERVERKIT_CACHE_DIR, 'wp-plugins')
DB_BACKUP_DIR = os.path.join(SERVERKIT_BACKUP_DIR, 'databases')
WP_BACKUP_DIR = os.path.join(SERVERKIT_BACKUP_DIR, 'wordpress')
SNAPSHOT_DIR = os.path.join(SERVERKIT_BACKUP_DIR, 'snapshots')
# Email / Mail server paths
VMAIL_DIR = os.environ.get('VMAIL_DIR', '/var/vmail')
VMAIL_UID = 5000
VMAIL_GID = 5000
EMAIL_CONFIG_DIR = os.path.join(SERVERKIT_CONFIG_DIR, 'email')