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

@@ -15,7 +15,7 @@ WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN pnpm build && pnpm exec emdash init && mkdir -p uploads
RUN pnpm build && mkdir -p storage/uploads
FROM deps AS runner
@@ -26,7 +26,6 @@ ENV HOST=0.0.0.0
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/uploads ./uploads
EXPOSE 4321