NitinBot001 commited on
Commit
246f521
·
verified ·
1 Parent(s): d81d6ab

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +30 -30
Dockerfile CHANGED
@@ -1,30 +1,30 @@
1
- FROM python:3.12-slim
2
-
3
- # Create non-root user
4
- RUN useradd -m appuser
5
-
6
- WORKDIR /app
7
-
8
- # Install dependencies
9
- COPY requirements.txt .
10
- RUN pip install --no-cache-dir -r requirements.txt
11
-
12
- # Copy project files
13
- COPY . .
14
-
15
- # Change ownership to non-root user
16
- RUN chown -R appuser:appuser /app
17
-
18
- # Switch to non-root user
19
- USER appuser
20
-
21
- # Expose only main app port
22
- EXPOSE 5000
23
-
24
- # Start all three apps
25
- CMD ["sh", "-c", "\
26
- gunicorn -b 0.0.0.0:5000 main:app & \
27
- gunicorn -b 0.0.0.0:5001 disease:app & \
28
- gunicorn -b 0.0.0.0:5002 medicine:app && \
29
- wait \
30
- "]
 
1
+ FROM python:3.12-slim
2
+
3
+ # Create non-root user
4
+ RUN useradd -m appuser
5
+
6
+ WORKDIR /app
7
+
8
+ # Install dependencies
9
+ COPY requirements.txt .
10
+ RUN pip install --no-cache-dir -r requirements.txt
11
+
12
+ # Copy project files
13
+ COPY . .
14
+
15
+ # Change ownership to non-root user
16
+ RUN chown -R appuser:appuser /app
17
+
18
+ # Switch to non-root user
19
+ USER appuser
20
+
21
+ # Expose only main app port
22
+ EXPOSE 7860
23
+
24
+ # Start all three apps
25
+ CMD ["sh", "-c", "\
26
+ gunicorn -b 0.0.0.0:7860 main:app & \
27
+ gunicorn -b 0.0.0.0:5001 disease:app & \
28
+ gunicorn -b 0.0.0.0:5002 medicine:app && \
29
+ wait \
30
+ "]