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
buildandtwineinstalled:
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
specfilesdirectory. - Run the
pyinstallercommand 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
mkdocsinstalled (pip install mkdocsif 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-mintapplication 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-Protoheader tohttps.proxy_set_header Host $host;: Ensures theHostheader from the original request is passed to the proxied server.
Then start ms-mint via the entrypoint.sh script.