Skip to content
Matthew edited this page Apr 24, 2015 · 5 revisions

Introduction

This is an expansion of what's on the Production wiki page.

Running locally

Build the container

docker build -t jolly_advisor .

Pull the postgres container

docker pull postgres:latest

Create the env files

jolly_env.env

THE_JOLLY_ADVISOR_DATABASE_USERNAME=user
THE_JOLLY_ADVISOR_DATABASE_PASSWORD=password
THE_JOLLY_ADVISOR_DATABASE_HOST=jollypostgres
THE_JOLLY_ADVISOR_DATABASE_PORT=5432
RAILS_ENV=production
SECRET_KEY_BASE=LOLSECRET
RAILS_SERVE_STATIC_FILES=true

jolly_postgres_env.env

POSTGRES_PASSWORD=password
POSTGRES_USER=user

Create a directory for the postgres datasets

Run the database (in the foreground)

docker run --rm --name jollypostgres --env-file=/full/path/to/jolly_postgres_env.env -v /full/path/to/postgres/save/location:/var/lib/postgresql/data/ postgres

Create the database

TODO: these instructions

Migrate the database

TODO: these instructions

Add the info from sis

TODO: these instructions

And run the actual app (again, in the foreground)

docker run --rm --name jolly --link jollypostgres:jollypostgres -p 3000:3000 --env-file=/full/path/to/jolly_env.env jolly_advisor

If docker --version >= 1.3.0, you can enter a running container with docker exec $container_name.

Clone this wiki locally