29 lines
		
	
	
		
			626 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			626 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
FROM python:3.13-slim
 | 
						|
 | 
						|
RUN apt-get update && apt-get install -y \
 | 
						|
    nginx \
 | 
						|
    uwsgi \
 | 
						|
    uwsgi-plugin-python3 \
 | 
						|
    sqlite3 \
 | 
						|
    libargon2-1 \
 | 
						|
    imagemagick \
 | 
						|
    && rm -rf /var/lib/apt/lists/*
 | 
						|
 | 
						|
RUN python -m venv --system-site-packages /opt/venv
 | 
						|
ENV PATH="/opt/venv/bin:$PATH"
 | 
						|
 | 
						|
WORKDIR /app
 | 
						|
COPY requirements.txt .
 | 
						|
RUN /opt/venv/bin/pip install --no-cache-dir -r requirements.txt
 | 
						|
 | 
						|
COPY . .
 | 
						|
 | 
						|
RUN mkdir -p /app/data/static
 | 
						|
RUN mkdir -p /app/data/db
 | 
						|
 | 
						|
RUN chown -R www-data:www-data /app/data/
 | 
						|
COPY nginx.conf /etc/nginx/nginx.conf
 | 
						|
COPY uwsgi.ini /app/
 | 
						|
 | 
						|
CMD ["sh", "-c", "uwsgi --ini uwsgi.ini & nginx -g 'daemon off;'"]
 |