diff --git a/README.md b/README.md index 2201e0c..10886d8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ ### Shinylims A Python Shiny app for LIMS reporting hosted on Posit Connect. + +The app displays metadata stored in pins. The pinning of data to Posit Connect is done using scripts running on the Illumina LIMS Clarity server: +https://github.com/NorwegianVeterinaryInstitute/nvi_lims_epps/tree/main/shiny_app + This python package is managed with uv (https://docs.astral.sh/uv). To run it, clone the repository and install the package with: ``` @@ -13,8 +17,16 @@ Then, run the shiny app with: uv run uvicorn shinylims.app:app ``` -For development: +Any pushes to main is automatically deployed on Posit Connect. Here we have two instances running; one test instance with admin-only access and one main production instance where everyone can gain access if needed. Each instance is associated with its own deploybranch on git. The value given in ```deploy_mode.txt``` specifies which deploy branch you are working on. + +| Posit instance name | Git deploy branch name | Value for deploy_mode.txt | Access | +| ------------------- | --------------------- | ------------------------- | ------ | +| shinylims-uv-test-deploy | test-deploy | test | admin access only | +| shinylims-uv-deploy | deploy | prod | open for everyone by request | + + +The idea here is to first implement any changes on an instance running on your local computer. After confirmed running as expected locally, push to the test Posit instance to confirm that everything also functions on Posit. Then change mode to 'prod' and push again to implement changes to the production instance of the app. You can also choose to deploy from both branches at the same time by using the mode ```both```. + +For doing code development locally, the api-key and Posit Connect URL must be provided in an .env file. Variables for the credentials are named ```POSIT_API_KEY``` and ```POSIT_SERVER_URL```. -* Set the deploy mode in deploy_mode.yaml. If set to 'test', any pushes to main will be deployed to the test-deploy shiny app instance on posit connect. Else set the mode to 'prod' to deploy on the production instance or 'both' to update both instances. The idea here is to first implement changes on an instance running on ypu local computer. When confirmed running as expected locally, first push to the test posit instance to confirm that everything also functions on posit. Then change to 'prod' and push again to implement changes to the production instance of the app. -* For local development, the apikey and posit connect url must be provided in a .env file. -* When pushing to main a Github actions pipeline will ensure that manifest and requirement files are created for posit deployment. These files along with any updates to the code are forced pushed to either the production deploy branch or the test_deploy branch depending on the mode set (see above) \ No newline at end of file +The deployment is handled by the github actions workflow stored in .github\workflows\deploy.yml. This action will create the manifest and requirement files for posit deployment. \ No newline at end of file diff --git a/deploy_mode.txt b/deploy_mode.txt index 30d74d2..117a245 100644 --- a/deploy_mode.txt +++ b/deploy_mode.txt @@ -1 +1 @@ -test \ No newline at end of file +both \ No newline at end of file