tina0101 commited on
Commit
1b4f629
·
verified ·
1 Parent(s): ecb3a70

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -1
Dockerfile CHANGED
@@ -14,4 +14,26 @@
14
  # EXPOSE 3001
15
  # CMD ["node", "server/server.js"]
16
 
17
- sync_data.sh
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  # EXPOSE 3001
15
  # CMD ["node", "server/server.js"]
16
 
17
+ FROM alpine AS builder
18
+
19
+ RUN apk add --no-cache nodejs npm git curl jq python3 python3-dev py3-pip
20
+
21
+ RUN adduser -D app
22
+ USER app
23
+ WORKDIR /home/app
24
+
25
+ RUN git clone https://github.com/louislam/uptime-kuma.git
26
+ WORKDIR /home/app/uptime-kuma
27
+ RUN npm run setup
28
+
29
+ ENV VIRTUAL_ENV=/home/app/venv
30
+ RUN python3 -m venv $VIRTUAL_ENV
31
+ ENV PATH="$VIRTUAL_ENV/bin:$PATH"
32
+
33
+ RUN pip install --no-cache-dir huggingface_hub
34
+
35
+ COPY --chown=app:app sync_data.sh /home/app/uptime-kuma/
36
+ RUN chmod +x /home/app/uptime-kuma/sync_data.sh
37
+
38
+ EXPOSE 3001
39
+ CMD ["/bin/sh", "-c", "./sync_data.sh & node server/server.js"]