Giter VIP home page Giter VIP logo

tbpweb's Introduction

tbpweb

TBP CA-A website, built in Django

Prerequisites

For a more detailed explaination and instruction on what to install, see the Setup's Prerequisites section

In summary, you need the following installed:

  • git
  • Any sh shell (e.g. bash, zsh, etc.) / Git Bash on Windows
  • Miniconda (or Anaconda)
  • Ruby (OCF uses 2.7.7, but we can use 3.1.X) (Windows should use Ruby+Devkit)
    • Install "Compass": gem install compass -v 1.0.3

Setup and Development

For a more detailed explaination and breakdown, see the Setup Wiki

Fork the tbpweb repository and clone your fork to your local machine

All commands must be ran on a sh shell

In summary, the commands you will use are (in general this order):

$ cd tbpweb                                     # enter our main directory
$ conda env create -f config/tbpweb-dev.yml     # create our Conda Environment and install dependencies
$ conda activate tbpweb-dev                     # enter our Conda Environment
$ python manage.py makemigrations               # Create migrations files
$ python manage.py migrate                      # apply all database changes
$ python manage.py runserver                    # start local web server (127.0.0.1:8000)
$ conda deactivate                              # Exit the Conda Environment

Remove the development environment by running: conda env remove --name tbpweb-dev

Development

To run the Django development server (which runs a web server locally), run

$ python manage.py runserver

which will make the web site available at http://127.0.0.1:8000.

You may also use python manage.py runserver 0.0.0.0:3000 to use http://localhost:3000 or http://0.0.0.0:3000

If you would like to access the admin interface in the local web server, run

$ python manage.py createsuperuser

You will be prompted for some login info, after which you should be able to access the admin interface with your super user credentials at http://localhost:3000/admin.

If there are development conflicts between Operating Systems, a solution that works on Linux takes precedence (as the destination OS on Berkeley's OCF)! Unix developers should also try to make their code Windows-friendly for the Window developers.

Deploy

Make sure all changes to be pushed are in tbpweb's master branch

Deploy by running fab --prompt-for-login-password deploy in the Conda Environment and enter the TBP OCF password

Other fabfile commands (including rollback) here: https://github.com/TBP-IT/tbpweb/wiki/Deployment

Various links to understand some of the code structure and tools

tbpweb's People

Contributors

ochan1 avatar chevin-ken avatar junolee128 avatar warpdrive6 avatar dinganthony avatar showyouramen avatar inferee avatar snowshoes7 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.