BCO Portal Local Deployment: Difference between revisions

From BCOeditor Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
In order to work with BCO API locally on a '''Mac OS''', please follow the following steps to set up:
In order to work with BCO API locally on a '''Mac OS''', please follow the following steps to set up:


'''BCO_API:'''
'''<big>BCO_API:</big>'''
# Clone the GitHub Repository  
# Clone the GitHub Repository  
## Open Terminal, enter following commands:  
## Open Terminal, enter following commands:  
Line 25: Line 25:
## Once see the messages as shown in the figure above, go to http://localhost:8000/api/admin/ on the local browser to see if BCO API is set up successfully
## Once see the messages as shown in the figure above, go to http://localhost:8000/api/admin/ on the local browser to see if BCO API is set up successfully


'''UserDB'''
'''<big>UserDB</big>'''

Revision as of 18:11, 5 October 2022

In order to work with BCO API locally on a Mac OS, please follow the following steps to set up:

BCO_API:

  1. Clone the GitHub Repository
    1. Open Terminal, enter following commands:
      1. git clone https://github.com/biocompute-objects/bco_api
      2. cd bco_api
  2. Switch to the latest release branch:
    1. git switch 22.10
  3. Enter the repository, create a virtual environment, and install the required packages:
    1. pyenv local 3.9.4 (Note: will show as pyenv: command not found if already installed)
    2. python3.9 -m venv env
    3. source env/bin/activate (activated virtual environment by showing (env) (base) MacBook-Pro-3:bco_api)
    4. python -m pip install -r requirements.txt (if installation failed, make sure you are in the correct path: /Users/Username/bco_api)
  4. Modify Configuration file
    1. Once in the virtual environment, make sure you are on the path:/Users/Username/bco_api
    2. Edit the server.conf file: vim bco_api/bco_api/server.conf
  5. Quick check to make sure the server can run
    1. cd bco_api/bco_api (Note after this command, should under path /Users/Username/bco_api/bco_api)
    2. Make migrations: python3.9 manage.py migrate
    3. If run successfully, should observe the following:
      Screen Shot 2022-10-04 at 15.05.22.png
  6. Create a super user for the API: python3.9 manage.py createsuperuser
    1. Follow the prompts
  7. python3.9 manage.py runserver 8000:
    Screen Shot 2022-10-04 at 15.15.54.png
    1. Once see the messages as shown in the figure above, go to http://localhost:8000/api/admin/ on the local browser to see if BCO API is set up successfully

UserDB