add docker stuff

This commit is contained in:
2025-06-29 18:17:15 +03:00
parent 6c731b04d3
commit 765e445bbf
5 changed files with 80 additions and 0 deletions

28
Dockerfile Normal file
View File

@ -0,0 +1,28 @@
FROM python:3.13-slim
RUN apt-get update && apt-get install -y \
nginx \
uwsgi \
uwsgi-plugin-python3 \
sqlite3 \
libargon2 \
imagemagick \
&& rm -rf /var/lib/apt/lists/*
RUN python -m venv /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;'"]