This is the repository for the CellarHQ.com v2 website.
We have a Slack account for talking with each other about things. Ask Rob for an invite.
Requirements:
- Java 8
- Gradle 2.1
- Vagrant
- docker (and boot2docker if on osx)
In order to get started, you will need to run vagrant up
from the deployment
directory of this project. This vagrant
image will bring up the development PostgreSQL database. After that has been provisioned, you will need to run
gradle update
to run the Liquibase migrations. This will run the migrations against the development and testing
databases which are contained in the vagrant image. If you want to run the migrations locally against the production
RDS instance, you need to run gradle update -PrunList=production
. This assumes you have set cellarhqprodpasswd in
~/.gradle/gradle.properties
. Ask Rob or Kyle for this password if you need it.
gradle build
will build and test the entire application
A number of system environment variables must be set in order to run certain parts of the application:
TWITTER_API_KEY
: Twitter API key. Necessary only for logging in with Twitter.TWITTER_API_SECRET
: Twitter API secret key. Necessary only for logging in with Twitter.AWS_ACCESS_KEY_ID
: Used for production; local development should always have mocked functionality.AWS_SECRET_ACCESS_KEY
: Used for production; local development should always have mocked functionality.
window 1$ gradle :web:run
window 2$ gradle :web:watch
The application relies on passing in environment variables for configuration. The current env vars are:
deploymentEnv
: Eitherproduction
ordevelopment
. If no value is provided,development
will be selected as the default. This configuration item is used for injecting different classes in Guice (ex: AmazonEmailService vs. LogEmailService).
pg_dump -h restored.c7ovcjlune88.us-east-1.rds.amazonaws.com -U cellarhq ebdb > snapshots/12-30-2015.sql
You will be prompted for the password.
psql -h localhost -p 15432 -U cellarhq cellarhq < snapshots/12-30-2015.sql