Spaces:
Running

MDHojayfa213 commited on
Commit
c074145
·
verified ·
1 Parent(s): f26122b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -6
Dockerfile CHANGED
@@ -1,4 +1,3 @@
1
-
2
  FROM node:22
3
 
4
  WORKDIR /app
@@ -9,6 +8,7 @@ RUN apt-get update && apt-get install -y \
9
  curl \
10
  wget \
11
  openssl \
 
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
  # Install OpenClaw
@@ -17,25 +17,30 @@ RUN npm install -g openclaw@latest
17
  # Install PM2
18
  RUN npm install -g pm2
19
 
 
 
 
20
  # Create directories
21
  RUN mkdir -p /data/openclaw
22
  RUN mkdir -p /data/logs
 
 
 
23
 
24
  # Set environment
25
  ENV OPENCLAW_DATA_PATH="/data/openclaw"
26
  ENV NODE_ENV="production"
 
27
 
28
  # Copy files
29
  COPY startup.sh /startup.sh
30
- COPY healthcheck.sh /healthcheck.sh
31
 
32
  # Make executable
33
  RUN chmod +x /startup.sh
34
- RUN chmod +x /healthcheck.sh
35
 
36
- # Health check
37
- HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
38
- CMD ["/healthcheck.sh"]
39
 
40
  # Start
41
  CMD ["/startup.sh"]
 
 
1
  FROM node:22
2
 
3
  WORKDIR /app
 
8
  curl \
9
  wget \
10
  openssl \
11
+ procps \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
  # Install OpenClaw
 
17
  # Install PM2
18
  RUN npm install -g pm2
19
 
20
+ # Install simple HTTP server for health checks
21
+ RUN npm install -g http-server
22
+
23
  # Create directories
24
  RUN mkdir -p /data/openclaw
25
  RUN mkdir -p /data/logs
26
+ RUN mkdir -p /data/openclaw/workspace
27
+ RUN mkdir -p /data/openclaw/agents/main/sessions
28
+ RUN mkdir -p /data/openclaw/memory
29
 
30
  # Set environment
31
  ENV OPENCLAW_DATA_PATH="/data/openclaw"
32
  ENV NODE_ENV="production"
33
+ ENV PORT=7860
34
 
35
  # Copy files
36
  COPY startup.sh /startup.sh
37
+ COPY health-server.js /health-server.js
38
 
39
  # Make executable
40
  RUN chmod +x /startup.sh
 
41
 
42
+ # Expose port for HF health check
43
+ EXPOSE 7860
 
44
 
45
  # Start
46
  CMD ["/startup.sh"]