A comprehensive refactor of OKCandidate based on feedback from users and our partners at the Virginian-Pilot.
| Develop branch status |
|---|
| |
A few setup steps need to happen before you can run everything in Docker.
First, copy .env-example to .env to configure the application, then run
./gen-dev-cert to create a development certificate chain so you can test
everything over https.
Then you can run docker-compose up and you just have to wait for everything to
get started.
Summary:
cp .env-example .env
./gen-dev-cert
docker-compose up
That will get you started with OkCandidate!
A local postgres database will need to be created to run okcandidate-platform. PgAdmin can be used to do this.
The following environment variables are expected to be available to the shell in which okcandidate-platform is running.
export OKC_DB_USER=blaine
export OKC_DB_PASS=''
export OKC_DB_NAME=okcandidate_platform_dev
export OKC_DB_HOST=localhost
export OKC_SESSION_SECRET_KEY=someGobbledygookThatIsAtLeast32CharactersLongClone the project from GitHub and install dependencies.
git clone [email protected]:Code4HR/okcandidate-platform.git && cd okcandidate-platform
npm installAfterwards, use
npm startto begin running application locally.
In a development environment, some records are generated automatically.
These user/pass combinations can be used to login as user of various roles.
// config/dev-fixtures/user-fixtures.js
...
{
name: 'A. Voter',
emailAddress: '[email protected]',
password: 'leafygreen'
},
{
name: 'A. Candidate',
emailAddress: '[email protected]',
password: 'mashedpotato'
},
{
name: 'Anne Admin',
emailAddress: '[email protected]',
password: 'adminpass'
}
...This project follows a loose interpretation of Git flow. Master is production, develop is staging. Each feature gets one branch. When opening a PR, please open it against the develop branch.