File size: 568 Bytes
ef1c204
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Use an official Python runtime
FROM python:3.9-slim

# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Install supervisor for process management
RUN apt-get update && apt-get install -y supervisor

# Copy application files
COPY . .

# Expose port for Streamlit
EXPOSE 8501

# Add supervisor configuration for running both Flask and Streamlit
COPY supervisor.conf /etc/supervisor/conf.d/supervisor.conf

# Run the supervisor to manage processes
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]