- Virtual environment:
python3 -m venv venv - Unix-like:
source venv/bin/activate - Windows:
venv\Scripts\activate - Install dependencies:
pip3 install -r requirements.txt - To use PDF: Install LibreOffice,
and specify the path to the executable in the
.envfile with theLIBREOFFICE_BINARYenvironment variable - Run it:
uvicorn main:app --reload
docker run -d -p 80:80 \
-v /path/to/result:/result \
-v /path/to/upload:/upload \
-v /path/to/sqlite.db:/app/docx.db \
-e DB_URL=sqlite:///docx.db \
ghcr.io/molodsom/docx-generator:latestIt also supports postgresql:// and mysql+pymysql:// schemas.
docker-compose up -d