Developer Notes
Building and Uploading the Package
To build the source distribution and wheel for ms-mint-app
, follow these steps:
- Navigate to the root directory of the project.
- Ensure you have
build
andtwine
installed:
pip install build twine
- Build the package using
pyproject.toml
:
python -m build
This will generate distribution archives in the dist
directory (both .tar.gz
and .whl
files).
- To upload the built package to PyPI, use
twine
:
python -m twine upload dist/*
This command will upload all distribution files to PyPI.
Windows Executables
To create Windows executables for the ms-mint
application, use pyinstaller
. Follow these steps:
- Navigate to the
specfiles
directory. - Run the
pyinstaller
command with the provided specification file:
cd specfiles && pyinstaller --noconfirm Mint.spec ..\scripts\Mint.py
This will generate a standalone executable for Windows based on the Mint.spec
file.
Documentation Deployment
To build and deploy the documentation using mkdocs
, follow these steps:
- Ensure you have
mkdocs
installed (pip install mkdocs
if not). - Run the following commands to build the documentation and deploy it to GitHub Pages:
mkdocs build && mkdocs gh-deploy
The mkdocs build
command generates the static site in the site
directory, and mkdocs gh-deploy
pushes it to the gh-pages
branch of your GitHub repository.
Example NGINX Configuration
To run ms-mint
on a remote server, you need to set up a reverse proxy using NGINX. Here is an example configuration:
server {
...
location / {
proxy_pass http://localhost:8000;
client_max_body_size 100G;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Host $host;
}
}
Explanation:
proxy_pass http://localhost:8000;
: Forwards all requests to thems-mint
application running on port 8000.client_max_body_size 100G;
: Increases the maximum allowed size of client request bodies to 100GB.proxy_set_header X-Forwarded-Proto https;
: Sets theX-Forwarded-Proto
header tohttps
.proxy_set_header Host $host;
: Ensures theHost
header from the original request is passed to the proxied server.
Then start ms-mint via the entrypoint.sh
script.