forked from horlapookie/Eclipse-MD
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (39 loc) · 957 Bytes
/
Copy pathDockerfile
File metadata and controls
49 lines (39 loc) · 957 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
41
42
43
44
45
46
47
48
49
FROM node:20-bullseye-slim
# Set working directory
WORKDIR /app
# Install system dependencies for native modules (fixes GLib-GObject error)
RUN apt-get update && apt-get install -y \
git \
libvips-dev \
libvips42 \
libcairo2-dev \
libpango1.0-dev \
libjpeg-dev \
libgif-dev \
librsvg2-dev \
libpng-dev \
pkg-config \
build-essential \
python3 \
g++ \
make \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Copy package files
COPY package*.json ./
# Install dependencies
# First install production dependencies
RUN npm install --production --legacy-peer-deps
# Rebuild native modules to ensure they work in the container
RUN npm rebuild || true
# Clean npm cache
RUN npm cache clean --force
# Copy application files
COPY . .
# Set environment variables
ENV NODE_ENV=production
ENV VIPS_WARNING=0
# Expose port (optional, for web interfaces)
EXPOSE 5000
# Start the bot
CMD ["npm", "start"]