multimodalart HF Staff commited on
Commit
c45ec4f
·
1 Parent(s): b0701b4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -5
Dockerfile CHANGED
@@ -3,8 +3,6 @@ FROM python:3.8-slim-buster
3
 
4
  # Set environment variables
5
  ENV PYTHONUNBUFFERED 1
6
- ENV API_ENDPOINT=""
7
- ENV WORKERS=2
8
 
9
  # Set work directory in the container
10
  WORKDIR /app
@@ -25,11 +23,14 @@ RUN rm /etc/nginx/sites-enabled/default
25
  COPY nginx.conf /etc/nginx/sites-available/
26
  RUN ln -s /etc/nginx/sites-available/nginx.conf /etc/nginx/sites-enabled/
27
 
28
- # Check Nginx config
29
- RUN service nginx configtest
 
 
 
30
 
31
  # Expose port for the app
32
  EXPOSE 7680
33
 
34
  # Start the application
35
- CMD service nginx start && python app.py
 
3
 
4
  # Set environment variables
5
  ENV PYTHONUNBUFFERED 1
 
 
6
 
7
  # Set work directory in the container
8
  WORKDIR /app
 
23
  COPY nginx.conf /etc/nginx/sites-available/
24
  RUN ln -s /etc/nginx/sites-available/nginx.conf /etc/nginx/sites-enabled/
25
 
26
+ # Test Nginx config
27
+ RUN nginx -t
28
+
29
+ # Give execution permissions to start.sh
30
+ RUN chmod +x start.sh
31
 
32
  # Expose port for the app
33
  EXPOSE 7680
34
 
35
  # Start the application
36
+ CMD ["./start.sh"]