File size: 571 Bytes
7ae7a2e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# 1. Use Alpine Linux for a minimal builder image
FROM alpine AS builder

# 2. Install Node.js, npm, and git
RUN apk add --no-cache nodejs npm git

# 3. Create a non-root user for safety
RUN adduser -D app
USER app

# 4. Set working directory
WORKDIR /home/app

# 5. Clone Uptime Kuma repository
RUN git clone https://github.com/louislam/uptime-kuma.git

# 6. Install and build Uptime Kuma
WORKDIR /home/app/uptime-kuma
RUN npm run setup

# 7. Expose the port (must match app_port above)
EXPOSE 3001

# 8. Start the Uptime Kuma server
CMD ["node", "server/server.js"]