first commit

This commit is contained in:
Rutra committed 2026-10-12 14:25:22 +02:00
commit 3c0479faf0
169 files changed
+27617

No files matched your search

+76
View File
@@ -0,0 +1,76 @@
import env from '#start/env'
import { resolve } from 'node:path'
/**
* Everything the dashboard needs to know about the VPS. Relative paths
* are resolved from the working directory, which lets the development
* setup point to the "dev-srv" fixture folder.
*/
const srvRoot = resolve(env.get('SRV_ROOT'))
const vpsConfig = {
/**
* Root of the projects tree ("/srv" on the VPS).
*/
srvRoot,
/**
* Folders of "/srv" holding one compose project per sub-folder.
* Any other folder with its own compose file is shown as infrastructure.
*/
projectCategories: ['api', 'frontend', 'fullstack', 'wordpress'] as const,
/**
* Folder of "/srv" holding the static sites.
*/
staticCategory: 'html',
/**
* The host "/proc" mounted in the container. When missing (local
* development), metrics fall back to the Node.js "os" module.
*/
hostProc: env.get('HOST_PROC'),
/**
* Path whose filesystem is reported as "disk" usage.
*/
diskPath: resolve(env.get('DISK_PATH') ?? srvRoot),
docker: {
/**
* Docker socket path. Dockerode picks the platform default when empty.
*/
socketPath: env.get('DOCKER_SOCKET'),
},
caddy: {
container: env.get('CADDY_CONTAINER'),
/**
* Caddyfile as seen by the dashboard (through the /srv mount).
*/
caddyfilePath: resolve(env.get('CADDYFILE_PATH')),
/**
* Same file as seen from inside the Caddy container.
*/
configPath: env.get('CADDY_CONFIG_PATH'),
},
mariadb: {
container: env.get('MARIADB_CONTAINER'),
},
/**
* Default domain of new projects: <name>.<baseDomain>
*/
baseDomain: env.get('BASE_DOMAIN'),
backups: {
dir: resolve(env.get('BACKUP_DIR')),
dailyAt: env.get('BACKUP_DAILY_AT') || null,
keep: env.get('BACKUP_KEEP') ?? 7,
},
}
export default vpsConfig