add docker stuff
This commit is contained in:
28
Dockerfile
Normal file
28
Dockerfile
Normal 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;'"]
|
Reference in New Issue
Block a user