refactor: consolidate all data in /var/lib/ironmount

This commit is contained in:
Nicolas Meienberger
2025-11-08 10:40:25 +01:00
parent ba08c97681
commit 4aeebea5b2
4 changed files with 17 additions and 36 deletions

View File

@@ -25,15 +25,11 @@ Ironmount is an easy to use web interface to manage your remote storage and moun
### Features ### Features
- ✅  Support for multiple protocols: NFS, SMB, WebDAV, Directory - ✅  Support for multiple protocols: NFS, SMB, WebDAV, Directory
- 📡  Mount your remote storage as local folders - 💾  Automated backups with encryption, compression and retention policies backed by Restic
- 🐳  Docker integration: mount your remote storage directly into your containers via a docker volume syntax
- 🔍  Keep an eye on your mounts with health checks and automatic remounting on error - 🔍  Keep an eye on your mounts with health checks and automatic remounting on error
- 📊  Monitor your mounts usage with detailed statistics and graphs - 📊  Monitor your mounts usage with detailed statistics and graphs
- 📡  Mount your remote storage as local folders
### Coming soon - 🐳  Docker integration: mount your remote storage directly into your containers via a docker volume syntax
- Automated backups with encryption and retention policies
- Integration with cloud storage providers (e.g. AWS S3, Google Drive, Dropbox)
## Installation ## Installation
@@ -51,16 +47,7 @@ services:
devices: devices:
- /dev/fuse:/dev/fuse - /dev/fuse:/dev/fuse
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/lib/ironmount/:/var/lib/ironmount/
- /run/docker/plugins:/run/docker/plugins
- /var/lib/ironmount/volumes/:/var/lib/ironmount/volumes:rslave
- /var/lib/repositories/:/var/lib/repositories
- /proc:/host/proc:ro
- ironmount_data:/data
volumes:
ironmount_data:
driver: local
``` ```
Then, run the following command to start Ironmount: Then, run the following command to start Ironmount:

View File

@@ -1,5 +1,5 @@
export const OPERATION_TIMEOUT = 5000; export const OPERATION_TIMEOUT = 5000;
export const VOLUME_MOUNT_BASE = "/var/lib/ironmount"; export const VOLUME_MOUNT_BASE = "/var/lib/ironmount/volumes";
export const REPOSITORY_BASE = "/var/lib/repositories"; export const REPOSITORY_BASE = "/var/lib/ironmount/repositories";
export const DATABASE_URL = "/data/ironmount.db"; export const DATABASE_URL = "/var/lib/ironmount/data/ironmount.db";
export const RESTIC_PASS_FILE = "/data/secrets/restic.pass"; export const RESTIC_PASS_FILE = "/var/lib/ironmount/data/restic.pass";

View File

@@ -5,6 +5,9 @@ import { drizzle } from "drizzle-orm/bun-sqlite";
import { migrate } from "drizzle-orm/bun-sqlite/migrator"; import { migrate } from "drizzle-orm/bun-sqlite/migrator";
import { DATABASE_URL } from "../core/constants"; import { DATABASE_URL } from "../core/constants";
import * as schema from "./schema"; import * as schema from "./schema";
import fs from "node:fs/promises";
await fs.mkdir(path.dirname(DATABASE_URL), { recursive: true });
const sqlite = new Database(DATABASE_URL); const sqlite = new Database(DATABASE_URL);
sqlite.run("PRAGMA foreign_keys = ON;"); sqlite.run("PRAGMA foreign_keys = ON;");

View File

@@ -6,6 +6,8 @@ services:
target: development target: development
container_name: ironmount container_name: ironmount
restart: unless-stopped restart: unless-stopped
devices:
- /dev/fuse:/dev/fuse
cap_add: cap_add:
- SYS_ADMIN - SYS_ADMIN
environment: environment:
@@ -13,11 +15,7 @@ services:
ports: ports:
- "4096:4097" - "4096:4097"
volumes: volumes:
# - /var/run/docker.sock:/var/run/docker.sock - /var/lib/ironmount/:/var/lib/ironmount/
# - /run/docker/plugins:/run/docker/plugins
# - /proc:/host/proc:ro
- /var/lib/repositories/:/var/lib/repositories
- ironmount_data:/data
- ./apps/client/app:/app/apps/client/app - ./apps/client/app:/app/apps/client/app
- ./apps/server/src:/app/apps/server/src - ./apps/server/src:/app/apps/server/src
@@ -29,18 +27,11 @@ services:
target: production target: production
container_name: ironmount container_name: ironmount
restart: unless-stopped restart: unless-stopped
devices:
- /dev/fuse:/dev/fuse
cap_add: cap_add:
- SYS_ADMIN - SYS_ADMIN
ports: ports:
- "4096:4096" - "4096:4096"
volumes: volumes:
# - /var/run/docker.sock:/var/run/docker.sock - /var/lib/ironmount/:/var/lib/ironmount/
# - /run/docker/plugins:/run/docker/plugins
# - /var/lib/ironmount/volumes/:/var/lib/ironmount/volumes:rslave
# - /proc:/host/proc:ro
- /var/lib/repositories/:/var/lib/repositories
- ironmount_data:/data
volumes:
ironmount_data:
driver: local