Provides a web-based interface for managing lab assistants. Allows TAs to configure seections for lab assistants to sign up for along with facilitating the check in process.
- master - is the main branch, storing the current code all non-course specific features should be branched from.
- cs61a - is the master branch for the CS61A course lab assistant manager instance.
- cs61b - is the master branch for the CS61B course lab assistant manager instance.
- data8 - is the master branch for the DATA8 course lab assistant manager instance.
- Fork the repository. If you are not used to github have a look at fork a repository
- Create a branch either from master (or a specific course branch if this is a 1 course only feature).
- Add your features and commit your desired changes.
- Create a pull request detailing your changes creating pull requests.
-
Set up VirtualBox, Vagrant & Homestead
Download and install virtual box: https://www.virtualbox.org/wiki/Downloads
Download and install vagrant: https://www.vagrantup.com/downloads.html
Install the Homestead Vagrant Box:
vagrant box add laravel/homestead
Install Homestead
cd ~ git clone https://github.com/laravel/homestead.git Homestead git checkout git checkout v6.1.0 // Clone the desired release... git checkout v6.1.0 // If on Mac / Linux... bash init.sh // If on Windows... init.bat
Update homestead.yaml to point to where you are cloning this repo. E.g:
folders: - map: ~/Projects/Check-In to: /home/vagrant/Code/Check-In sites: - map: la.app to: /home/vagrant/Code/Check-In/public php: "5.6"
-
The Hosts File
You must add the "domains" for your Nginx sites to the hosts file on your machine. The hosts file will redirect requests for your Homestead sites into your Homestead machine. On Mac and Linux, this file is located at
/etc/hosts
. On Windows, it is located atC:\Windows\System32\drivers\etc\hosts
. The lines you add to this file will look like the following:192.168.10.10 la.app
Make sure the IP address listed is the one set in your Homestead.yaml file. Once you have added the domain to your hosts file and launched the Vagrant box you will be able to access the site via your web browser:
-
SSH Into Vagrant Box
vagrant ssh // Set working directory to be project location cd Code/Check-In
-
Via SSH install dependencies through the PHP package manager
composer
.composer install
-
Via SSH run the database migrations
php artisan migrate
-
Via SSH Seed the database with the proper first few values
php artisan db:seed --class DefaultSettingsSeeder
-
Launch Vagrant:
vagrant up
If you change the sites or maps inside of
Homestead.yaml
you will need to run the following to update Vagrant:vagrant reload --provision
-
Point your browser to http://la.app.
First point a git remote to the Dokku server:
git remote add dokku [email protected]:la
To deploy from master:
git push dokku master
Deploy from another branch:
git push dokku my_branch:master
Note: These are deployment instructions to the CS61A managed Dokku platform. They should be generic enough to follow to deploy to your own Dokku instance however.
Tip: add alias dokku="ssh -t [email protected]"
to your aliases file (e.g. ~/.bashrc
).
dokku apps:create app-name
git remote add online [email protected]:<app_name>
dokku mysql:create db-name
dokku mysql:link db-name app-name
# Set DNS record
dokku domains:add app-name name.cs61a.org
# Get the APP KEY
dokku enter <app_name> web php artisan key:generate
dokku config:set app-name APP_KEY=<KEY COPIED FROM key:generate command> APP_ENV=prod OK_COURSE_OFFERING="cal/cs61a/fa17" APP_OAUTH_KEY=<SECRET> FORCE_HTTPS=true MAIL_DRIVER=mailgun MAIL_GUN_DOMAIN=<MAIL_GUN_DOMAIN> MAIL_GUN_SECRET=<MAIL_GUN_SECRET>
MAIL_HOST=<MAIL_HOST> MAIL_PORT=<MAIL_PORT> MAIL_USERNAME=<MAIL_USERNAME> MAIL_PASSWORD=<MAIL_SECRET> MAIL_ENCRYPTION=null
dokku letsencrypt app-name
# Change OK OAuth to support the domain
# Run migrations after following steps in Deployment
dokku enter <app_name> web php artisan migrate --force
dokku enter <app_name> web php artisan db:seed --class=DefaultSettingsSeeder --force