-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (26 loc) · 754 Bytes
/
Dockerfile
File metadata and controls
37 lines (26 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Use Node.js 22 slim image
FROM node:22-slim
# Set working directory
WORKDIR /app
# Install build dependencies for native modules (better-sqlite3)
RUN apt-get update && \
apt-get install -y python3 make g++ && \
rm -rf /var/lib/apt/lists/*
# Copy package files
COPY package*.json ./
# Install all dependencies (including devDependencies for build)
RUN npm ci && npm cache clean --force
# Copy application files
COPY . .
# Build Tailwind CSS
RUN npm run build:css
# Remove devDependencies to reduce image size
RUN npm prune --production
# Create data directory for SQLite database
RUN mkdir -p /app/data
# Expose port
EXPOSE 6789
# Set environment variable
ENV NODE_ENV=production
# Start the application
CMD ["node", "src/server.js"]