Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

biocompute-objects/portal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9d49770 · Apr 5, 2022
Jul 2, 2021
Oct 31, 2021
Feb 17, 2022
Apr 5, 2022
Jul 24, 2019
Oct 31, 2021
Aug 7, 2020
Dec 28, 2021
Dec 28, 2021
Jul 24, 2019
Aug 7, 2020
Aug 7, 2020
Nov 11, 2021
Aug 7, 2020
Nov 11, 2021
Jun 25, 2021
Aug 7, 2020
Oct 31, 2021
Feb 17, 2022

Repository files navigation

BCO portal

There are two scripts for deploying the portal, cpg.sh (Clone Portal from Github) and mpb.sh (Move Portal Build). cpg.sh should be run in beta_portal_user or portal_user's home directory, as that is where the build is done. mpb.sh should be run in a wheel user's home directory, as the script requires sudo permissions to move the build from beta_portal_user or portal_user's home directory. In summary,

Steps

  1. cpg.sh (Clone Portal from Github) - Run in beta_portal_user or portal_user's home directory.
  2. mpb.sh (Move Portal Build) - Run in a wheel user's home directory using "sudo mpb.sh".

UserDB

The git folder (application) that contains all of the user information for the portal is /portal/userdb/. You'll want to create a virtual environment and a super user to administer the user application using the following steps.

Steps

  1. cd /portal/userdb/
  2. virtualenv env
  3. source env/bin/activate
  4. cd portalusers
  5. pip3 install -r requirements.txt
  6. python3 manage.py makemigrations
  7. python3 manage.py migrate
  8. python3 manage.py createsuperuser (fill out the information)

(Optional) If you're not using nginx and gunicorn, you can serve the application directly by following these steps.

  1. python3 manage.py runserver 8000

Containerization

The web portal can be containerized for easier development and deployment.

Building in a container with docker

You can build the container by running the build command:

docker build -t bco_portal .

Running the container with docker

You can run the container via docker through the following command:

docker run --network host --rm -t bco_portal

This will set the portal to be available at localhost:3000 on the host machine.