gcharanteja Qwen-Coder commited on
Commit
ee6a4fb
·
1 Parent(s): c9f58f1

Fix: Add port forwarding from 3000 to 7860

Browse files

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

Files changed (1) hide show
  1. Dockerfile +9 -5
Dockerfile CHANGED
@@ -3,10 +3,14 @@
3
 
4
  FROM maxxcarl/uptime-monitoring-api:latest
5
 
6
- # HF Spaces requires port 7860
7
- EXPOSE 7860
 
 
8
 
9
- # Override the default port if the app supports it
10
- # ENV PORT=7860
 
11
 
12
- CMD ["rust-api-server"]
 
 
3
 
4
  FROM maxxcarl/uptime-monitoring-api:latest
5
 
6
+ USER root
7
+
8
+ # Install socat for port forwarding
9
+ RUN apt-get update && apt-get install -y socat && rm -rf /var/lib/apt/lists/*
10
 
11
+ USER appuser
12
+
13
+ EXPOSE 7860
14
 
15
+ # Start the app and forward port 3000 to 7860
16
+ CMD sh -c "rust-api-server & socat TCP-LISTEN:7860,fork TCP:localhost:3000"