-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (34 loc) · 1.05 KB
/
Dockerfile
File metadata and controls
45 lines (34 loc) · 1.05 KB
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
# Use Node.js LTS as base image
FROM node:24-alpine
# Set working directory
WORKDIR /app
# Install git, bash, curl, and OpenSSH client
RUN apk add --no-cache \
git \
bash \
curl \
openssh-client \
jq
# Install GitHub CLI for Alpine using binary
RUN GH_VERSION=$(curl -s https://api.github.com/repos/cli/cli/releases/latest | grep '"tag_name"' | cut -d '"' -f 4) \
&& curl -L "https://github.com/cli/cli/releases/download/${GH_VERSION}/gh_${GH_VERSION#v}_linux_amd64.tar.gz" | tar xz \
&& mv "gh_${GH_VERSION#v}_linux_amd64/bin/gh" /usr/local/bin/ \
&& rm -rf "gh_${GH_VERSION#v}_linux_amd64"
# Copy package files
COPY package*.json ./
# Install all dependencies
RUN npm ci
# Copy source code
COPY . .
# Build the application
RUN npm run build
# Create app data directory
RUN mkdir -p /app/data
# Expose port 2624 (BNCH on telephone keypad: B=2, N=6, C=2, H=4)
EXPOSE 2624
# Set environment variables
ENV NODE_ENV=production
ENV SOURCE_BASE_PATH=/home/node/Source
ENV APP_DATA_PATH=/app/data
# Start the application
CMD ["npm", "start"]