This is the repository and source code for https://pilot.oaklandca.gov
.
- The website is built on Craft CMS (https://craftcms.com/)
- Sourcecode is hosted on GitHub (https://github.com/CityofOakland/oaklandca.gov)
- The production app is hosted on Heroku (http://oakland-beta.herokuapp.com/)
- A Varnish Cache and Reverse Proxy is hosted on an AWS EC2 instance. Cached pages are served directly from Varnish server and non-cachced pages are passed through to the Heroku app.
- https://beta.oaklandca.gov is pointed at the Heroku app and https://pilot.oaklandca.gov is pointed at the Varnish server.
The CMS admin interface is accessible through https://beta.oaklandca.gov/admin
There are many ways to setup your Nginx server and mySql database. Here's one method:
- Clone this repo into
~/Sites
- Install MAMP - https://www.mamp.info/en/
- In the MAMP settings, Point the MAMP server to
~/Sites
- Start the MAMP server
- In the MAMP settings, Point the MAMP server to
- Install Sequel Pro - http://www.sequelpro.com/
- Login using the socket tab with default username
root
and passwordroot
- Add a new database with the name
oaklanddb
- Import the production database using the Backup DB setting - - https://beta.oaklandca.gov/admin/settings/
- Login using the socket tab with default username
Stylesheets in this repo generated using Scss. Scss files can be compiled into css in many ways. Here's one method:
- Install Node - https://nodejs.org/en/
- Run
npm install
- Install the grunt-cli globally using
npm install -g grunt-cli
- Run
grunt
to compile change indev/scss
topublic/resources/css/main.css
- Run
grunt watch
to watch for live changes and auto-compile
There's probably a more efficient way to do this but this has been my current method to make sure that production and local schemas stay in sync.
- Make schema changes using the admin interface on the production server - https://beta.oaklandca.gov/admin/settings/
- Download the production DB using the Backup DB setting
- Import the production DB to local using Sequel Pro
- Create a new branch, make changes, and test locally
- Push branch to this GitHub repo and submit pull request
- Merging the pull request to master will deploy changes to the production Heroku server
Pushing to the master branch of https://github.com/codeforamerica/oakland-beta will automatically update oakland-beta.herokuapp.com
- Visual Design Guidelines and a Pattern Portfoliio for this website is located at
https://design.oaklandca.gov/
.