Vitrous commited on
Commit
a498248
·
verified ·
1 Parent(s): e84f084

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -18
Dockerfile CHANGED
@@ -28,24 +28,9 @@ WORKDIR $HOME/app
28
  # Copy the application files into the container
29
  COPY --chown=user . $HOME/app
30
 
31
- # Download and install ngrok
32
- RUN wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.tgz -O /tmp/ngrok.tgz && \
33
- tar xvzf /tmp/ngrok.tgz -C /usr/local/bin && \
34
- rm /tmp/ngrok.tgz
35
-
36
- # Update ngrok
37
- RUN /usr/local/bin/ngrok update
38
-
39
- # Verify ngrok version
40
- RUN /usr/local/bin/ngrok version
41
-
42
- # Create ngrok configuration
43
- RUN mkdir -p $HOME/.ngrok2 && \
44
- echo "authtoken: 1XtU01EKWysplGQ8fz54lVUQpnQ_3KKhw6YNQ5E85rxdkgXx4" > $HOME/.ngrok2/ngrok.yml
45
-
46
- # Set the command to run the FastAPI application and ngrok
47
- CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port 7860 & sleep 5 && ngrok http 7860"]
48
 
49
  # Expose the port for ngrok and FastAPI
50
  EXPOSE 7860
51
- EXPOSE 4040
 
28
  # Copy the application files into the container
29
  COPY --chown=user . $HOME/app
30
 
31
+ # Start uvicorn server with multiple workers
32
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "2"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
 
34
  # Expose the port for ngrok and FastAPI
35
  EXPOSE 7860
36
+