diff --git a/Dockerfile b/Dockerfile index dd6bcc0..dcec29d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.13-slim +FROM python:3.11-slim RUN apt-get update && apt-get install -y \ nginx \ @@ -9,7 +9,7 @@ RUN apt-get update && apt-get install -y \ imagemagick \ && rm -rf /var/lib/apt/lists/* -RUN python -m venv /opt/venv +RUN python -m venv --system-site-packages /opt/venv ENV PATH="/opt/venv/bin:$PATH" WORKDIR /app diff --git a/README.md b/README.md index 86f6ef0..311f2a7 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Pyrom python/flask port of [porom](https://git.poto.cafe/yagich/porom) -this is now the canonical implementation of porom +this is now the canonical implementation of porom. it's compatible with the database of porom. # License Released under [CNPLv7+](https://thufie.lain.haus/NPL.html). @@ -20,8 +20,10 @@ $ docker compose up make sure to run it in an interactive session the first time, because it will spit out the password to the auto-created admin account. +alternatively, if you already had porom running before, put the db file (`db.prod.sqlite`) in `data/db` and it will Just Work. + ## manual (development) -1. install python >= 3.13, sqlite3, libargon2, and imagemagick & clone repo +1. install python >= 3.11, sqlite3, libargon2, and imagemagick & clone repo 2. create a venv: ```bash diff --git a/nginx.conf b/nginx.conf index 0563859..644a464 100644 --- a/nginx.conf +++ b/nginx.conf @@ -3,6 +3,7 @@ events { } http { + include /etc/nginx/mime.types; server { listen 8080; server_name localhost; diff --git a/uwsgi.ini b/uwsgi.ini index b2cb55c..333245c 100644 --- a/uwsgi.ini +++ b/uwsgi.ini @@ -8,7 +8,7 @@ chmod-socket = 666 plugins = python3 virtualenv = /opt/venv -pythonpath = /opt/venv/lib/python3.13/site-packages +pythonpath = /opt/venv/lib/python3.11/site-packages uid = www-data gid = www-data