-
-
Notifications
You must be signed in to change notification settings - Fork 94
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (21 loc) · 606 Bytes
/
Dockerfile
File metadata and controls
27 lines (21 loc) · 606 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
# Use a lightweight Node.js image
FROM node:22-alpine
# Set working directory
WORKDIR /src
# Set environment variables
ENV NODE_ENV="production"
# Copy package*.json and .env dependencies
COPY package*.json ./
COPY .env.template ./.env
# Install necessary system packages and dependencies
RUN apk add --no-cache \
bash \
vim \
&& npm ci --only=production --silent \
&& npm cache clean --force \
&& rm -rf /tmp/* /var/tmp/* /usr/share/doc/*
# Copy the application code
COPY frontend frontend
COPY backend backend
# Set default command to start the application
CMD ["npm", "start"]