Files
ServerKit/backend/app/paths.py
T
Juan Denis b7fab1152b Add invitations, email models, admin APIs
Introduce team invitation support and a revamped email subsystem plus admin features. Adds Invitation model and API endpoints (create, list, revoke, resend, validate) and integrates invitation validation into user registration. Replaces old email account model with richer email models (EmailDomain, EmailAccount, EmailAlias, EmailForwardingRule, DNSProviderConfig) and updates models __init__. Refactors email API to manage domains, accounts, aliases, forwarding, DNS providers, spamassassin, Roundcube/Postfix services and queue/log endpoints. Adds several backend services (invitation, DNS provider, DKIM, Dovecot, Postfix, Roundcube, SpamAssassin, permission service) and a DB migration for permissions/invitations. Enhances admin API with permission management and activity dashboard endpoints, extends audit log actions, and adds a permission_required RBAC decorator. Includes frontend additions for settings/invitations UI and miscellaneous config/service updates and tests.
2026-03-04 02:34:49 -05:00

26 lines
1.2 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')
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')