This project provides a way to download installation scripts for your projects. This will create a shell script (.sh
) or a configuration file (.config
) to be run on your machine.
This application provides a simplified and abstracted RESTful API that can be easily consumed by the UoW Frontend App1.
Note
This repository was created within Azure DevOps and is now being mirrored to this GitHub repository. Source of truth will always be the Azure DevOps repository. Furthermore, this repository is a proof of concept for creating various scripts for MacOS / WinOS and has not been fully implemented so YMMV.
More work needs to be completed for the final version of the application. Below are additional things required for a clearer vision of what is envisioned of this application.
Require all API requests to be authenticated via Azure Active Directory (AAD). There is various libraries that offer the
capability of configuring authentication for AAD. The chosen library, should allow for setting required scopes
to access
an endpoint e.g. scopes=['user']
, if the user does not have this scope a HTTP status of 403 Forbidden will be returned.
In the same way a user is able to request a script to be generated, containing all their packages needed for a project, another should be provided to remove and uninstall everything. Allowing for fresh installs on new projects etc.
.
├── app # "app" is a Python package
│ ├── __init__.py # this file makes "app" a "Python package"
│ ├── main.py # "main" module, e.g. import app.main
│ └── routers # "routers" is a "Python subpackage"
│ ├── __init__.py # makes "routers" a "Python subpackage"
│ └── dashboard.py # "dashboard" submodule, e.g. import app.routers.dashboard
│ └── notifications.py # "notifications" submodule, e.g. import app.routers.notifications
│ └── projects.py # "projects" submodule, e.g. import app.routers.projects
│ └── setting.py # "setting" submodule, e.g. import app.routers.setting
│ └── user.py # "user" submodule, e.g. import app.routers.user
- Install python packages used for the service
pip install -r requirements.txt
- Run the FastAPI server, which will run on port 8000
Endpoint documentation are available on http://127.0.0.1:8000/docs
python app/main.py
Unit tests are located in /tests
directory.
The easiest way to deploy the Next.js app is to use the Azure Web App, this project has been configured to
automatically deploy changes made to the master
branch to an environment variable, see /azure-pipeline/azure-pipelines.yml
the following variables are required to be set.
Variable | Description | Default value | Required? |
---|---|---|---|
azureSubscription | The Azure Subscription that contains the Azure Web App | N/A | Yes |
projectPoolName | The azure agent pool that the job will run on | N/A | Yes |
pythonStartUpCommand | The start-up command to start the next.js web application | gunicorn -w 4 -k uvicorn.workers.UvicornWorker app.main:app | No |
webAppName | The name of the created Azure Web App | N/A | Yes |
Checkout Deploy to App Service using Azure Pipelines for more details.