You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							28 lines
						
					
					
						
							624 B
						
					
					
				
			
		
		
	
	
							28 lines
						
					
					
						
							624 B
						
					
					
				# Use an official Python runtime as a parent image
 | 
						|
FROM python:3.10-slim-buster
 | 
						|
 | 
						|
# Set environment varibles
 | 
						|
ENV PYTHONDONTWRITEBYTECODE 1
 | 
						|
ENV PYTHONUNBUFFERED 1
 | 
						|
 | 
						|
# Set work directory
 | 
						|
WORKDIR /app
 | 
						|
 | 
						|
# Install system dependencies
 | 
						|
RUN apt-get update && apt-get install -y --no-install-recommends \
 | 
						|
        gcc \
 | 
						|
        default-libmysqlclient-dev \
 | 
						|
    && rm -rf /var/lib/apt/lists/*
 | 
						|
 | 
						|
# Install Python dependencies
 | 
						|
COPY requirements.txt /app/
 | 
						|
RUN pip install --no-cache-dir -r requirements.txt
 | 
						|
 | 
						|
# Copy project
 | 
						|
COPY . /app/
 | 
						|
 | 
						|
# Expose port
 | 
						|
EXPOSE 5000
 | 
						|
 | 
						|
# Run the application:
 | 
						|
CMD ["gunicorn", "-w", "4", "-k", "gevent", "api:app"] |