Deployment of the API
The API is a Python package that can be installed on a Linux system. You can install the package from PyPI, from source, or run it in a Docker container.
The API uses MongoDB as a database. You can either use a local instance of MongoDB or use a cloud service such as MongoDB Atlas. Specify the connection string in the
MONGODB_URL environment variable.
Installing the API from PyPI
Running the API
You can then create a systemd service to run the application as daemon.
Running in Docker
Make sure you have installed latest Docker on your system.
Running in docker
You can also use docker-compose file which will run the MongoDB database in a separate container along side the API container.
Run the compose file with
You can deploy the API to Kubernetes cluster using the following manifests:
- name: unipoll-api
- containerPort: 80
- name: MONGODB_URL
Instal the package from source
Get the latest version of the API from the releases page
Make sure you have the following installed on your system:
- Python 3.11
Unpack the archive with
Optionally, create a virtual environment. Make sure you have installed
venv package. You can create a virtual environment using the following command:
Run the following command in the root directory of the project:
This will install the package and all its dependencies on your system. The you can run the API as a service using systemd.