25 lines
		
	
	
		
			587 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			587 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
FROM python:alpine
 | 
						|
 | 
						|
# Set the working directory
 | 
						|
WORKDIR /app
 | 
						|
 | 
						|
# Copy the requirements file into the container
 | 
						|
COPY requirements.txt .
 | 
						|
 | 
						|
# Install the required packages
 | 
						|
RUN pip install --no-cache-dir -r requirements.txt
 | 
						|
RUN pip install gunicorn
 | 
						|
 | 
						|
# Copy the rest of the application code into the container
 | 
						|
COPY src src
 | 
						|
COPY templates templates
 | 
						|
COPY static static
 | 
						|
 | 
						|
# Expose the port the app runs on
 | 
						|
EXPOSE 5000
 | 
						|
 | 
						|
# Set environment variables
 | 
						|
ENV FLASK_APP=main.py
 | 
						|
 | 
						|
# run the application
 | 
						|
ENTRYPOINT [ "gunicorn",  "-b", ":5000", "--access-logfile", "-", "--error-logfile", "-", "src.main:app" ] |