docker
This commit is contained in:
@@ -2,6 +2,9 @@ FROM node:18-alpine
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Install build dependencies for better-sqlite3
|
||||||
|
RUN apk add --no-cache python3 make g++
|
||||||
|
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm install --production
|
RUN npm install --production
|
||||||
|
|
||||||
@@ -9,7 +12,6 @@ COPY . .
|
|||||||
|
|
||||||
# Initialize DB during build or rely on start
|
# Initialize DB during build or rely on start
|
||||||
# We'll just ensure the directory is writable if needed, but sqlite file is created at runtime if not present.
|
# We'll just ensure the directory is writable if needed, but sqlite file is created at runtime if not present.
|
||||||
# However, if we want to risk it, we can pre-create it. But better let the app handle it.
|
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user