refactor: move data.db and uploads to storage/ folder

- Changed database path to ./storage/data.db
- Changed uploads path to ./storage/uploads
- Updated Dockerfile to create storage/uploads dir (not uploads)
- Updated entrypoint.sh to check /app/storage/data.db
- Removed COPY of uploads from builder to runner

Now all persistent data is in /app/storage/:
- /app/storage/data.db (SQLite database)
- /app/storage/uploads/ (uploaded media)

Easypanel mount: emdash-storage → /app/storage

To update EmDash: change version in package.json → push → redeploy

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Kunthawat Greethong
2026-05-02 10:24:03 +07:00
parent 30eeee186f
commit 49725b2fd0
3 changed files with 17 additions and 12 deletions

View File

@@ -17,9 +17,9 @@ export default defineConfig({
integrations: [
react(),
emdash({
database: sqlite({ url: "file:./data.db" }),
database: sqlite({ url: "file:./storage/data.db" }),
storage: local({
directory: "./uploads",
directory: "./storage/uploads",
baseUrl: "/_emdash/api/media/file",
}),
plugins: [auditLogPlugin()],