AugurWorks / Engine

http://engine.augurworks.com/
MIT License
2 stars 0 forks source link

Engine

AugurWorks UI Engine 2.0

Requirements

Requires alfred:2.0.0 or later

Deployment

A production environment can be built which uses environment variables for all customizable config values. The environment variables are listed below:

Local Development

Dependencies

Setup

Engine uses GitHub OAuth for authentication, so you'll need to set up a new GitHub OAuth application and add the keys as environment variables matching those above. The Authorization callback URL should be http://[local-machine-IP]:8080/oauth/github/callback.

Database

Run a local MySQL instance with Docker by running the following:

docker run -d --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=docker -e MYSQL_DATABASE=engine mysql

Database Migrations

Database migration diffs can be created with a local MySQL instances using the following command:

grails prod -DRDS_PASSWORD=[MySQL root password] -DRDS_HOSTNAME=[MySQL host ip] dbm-gorm-diff --add [filename].groovy

Migrations can be tested on production data by exporting the prod database to SQL, loading it into a local DB, and executing the migrations with the following:

mysqldump -h [prod DB host] -u [username] -p [password] [database] > backup.sql
mysql -h [prod DB host] -u [username] -p [password] [database] < backup.sql
grails prod -DRDS_PASSWORD=[password] -DRDS_HOSTNAME=[database hostname] dbm-changelog-sync

Local Docker

An example local Docker run command is:

docker run -d --name=alfred -p 8080:8080 274685854631.dkr.ecr.us-east-1.amazonaws.com/alfred:latest

A fresh Docker container can be built by running the following:

docker build -t engine .

Running

Run the application with grails run-app. After the app starts go to http://[local-machine-IP]:8080, authorize the GitHub OAuth application, then you'll be redirected back to the running application.

Running with Alfred

Alfred is most easily run locally using Docker. Follow the steps below to configure Alfred: