Spaces:
Running

MDHojayfa213 commited on
Commit
fd8a4aa
·
verified ·
1 Parent(s): c0e4cd8

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +38 -0
Dockerfile ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use minimal Node.js image
2
+ FROM node:22-alpine
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Install only essential packages
8
+ RUN apk add --no-cache \
9
+ curl \
10
+ openssl \
11
+ ca-certificates \
12
+ && rm -rf /var/cache/apk/*
13
+
14
+ # Create app directories
15
+ RUN mkdir -p /data/logs /data/cc-green
16
+
17
+ # Set environment
18
+ ENV NODE_ENV=production \
19
+ PORT=7860 \
20
+ OPENCLAW_DATA_PATH=/data/cc-green \
21
+ CC_CONFIG_VERSION=2.0.0
22
+
23
+ # Copy application files
24
+ COPY startup.sh /startup.sh
25
+ COPY webhook-server.js /webhook-server.js
26
+
27
+ # Make startup executable
28
+ RUN chmod +x /startup.sh
29
+
30
+ # Expose port
31
+ EXPOSE 7860
32
+
33
+ # Health check
34
+ HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
35
+ CMD curl -f http://localhost:7860/health || exit 1
36
+
37
+ # Start application
38
+ CMD ["/startup.sh"]