-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (32 loc) · 813 Bytes
/
Dockerfile
File metadata and controls
40 lines (32 loc) · 813 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
38
39
40
FROM node:22-slim
# Install system dependencies for canvas and better-sqlite3
RUN apt-get update && apt-get install -y \
build-essential \
libnode108 \
python3 \
git \
pkg-config \
libcairo2-dev \
libjpeg-dev \
libpango1.0-dev \
libgif-dev \
librsvg2-dev \
libsqlite3-dev \
sqlite3 \
node-gyp \
g++ \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy package.json and package-lock.json
COPY package*.json ./
# Install project dependencies
RUN npm install && npm cache clean --force
# Copy the rest of the application
COPY . .
# Build the application
RUN npm run build
# Expose the port the app runs on
EXPOSE 3000
# Command to run the application
CMD ["sh", "-c", "npm run migration:run && npm run seed:run && npm run start:prod"]