initialize project with basic structure and dependencies
This commit is contained in:
parent
8548717074
commit
7d29dad687
3 changed files with 3 additions and 1 deletions
|
|
@ -14,6 +14,7 @@ FROM node:22-alpine
|
|||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app/.output /app/.output
|
||||
COPY --from=builder /app/drizzle /app/drizzle
|
||||
COPY --from=builder /app/package*.json ./
|
||||
|
||||
RUN mkdir -p /app/uploads /app/data
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ services:
|
|||
- ./uploads:/app/uploads
|
||||
environment:
|
||||
- DATABASE_PATH=/app/data/revisione.db
|
||||
- MIGRATIONS_PATH=/app/drizzle
|
||||
networks:
|
||||
- nginx_proxy_manager_default
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { db } from "../db/index";
|
|||
import { resolve } from "path";
|
||||
|
||||
export default defineNitroPlugin(async () => {
|
||||
const migrationsFolder = resolve(process.cwd(), "drizzle");
|
||||
const migrationsFolder = process.env.MIGRATIONS_PATH || resolve(process.cwd(), "drizzle");
|
||||
migrate(db, { migrationsFolder });
|
||||
console.log("[revisione] db migrations applied");
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue