* adds logging for gunicorn by default * adds image tagging * drops docker-compose environment setting in favor of .env usage (needs to be copied from .env.sample)
		
			
				
	
	
		
			28 lines
		
	
	
		
			674 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			674 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
FROM python:3.11-slim-bullseye
 | 
						|
ENV PYTHONUNBUFFERED 1
 | 
						|
 | 
						|
WORKDIR /konova
 | 
						|
 | 
						|
# Install some dependencies
 | 
						|
RUN apt update
 | 
						|
RUN apt install -y gdal-bin redis-server nginx
 | 
						|
 | 
						|
# Copy requirements file into workspace and install all dependencies
 | 
						|
COPY ./requirements.txt /konova/
 | 
						|
RUN pip install --upgrade pip
 | 
						|
RUN pip install -r requirements.txt
 | 
						|
 | 
						|
# Remove nginx default configuration and replace with own configuration
 | 
						|
RUN rm /etc/nginx/sites-enabled/default
 | 
						|
COPY ./nginx.conf /etc/nginx/conf.d
 | 
						|
 | 
						|
# Create log folders
 | 
						|
RUN mkdir /var/log/gunicorn
 | 
						|
 | 
						|
# Copy rest of project into workspace
 | 
						|
COPY . /konova/
 | 
						|
 | 
						|
# Move static files in designated folder
 | 
						|
RUN python manage.py collectstatic  --noinput
 | 
						|
 |