Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Ryan Wold edited this page Mar 17, 2021 · 11 revisions

WORK IN PROGRESS ⚠️

Touchpoints can be run in a docker containers, which provides a way for developers to get up and running easily, by handling dependencies in a consistent way.

Preconfig:

  1. Create an oauth app on Github and capture github_client_id & github_secret ( https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app/ )
  2. Create S3 bucket on AWS and capture AWS_ACCESS_KEY, AWS_SECRET, S3_BUCKET_NAME & AWS_REGION - HOWTO

Configure project

  1. clone touchpoints with git clone git@github.com:GSA/touchpoints.git
  2. cd touchpoints
  3. cp .env.sample .env
  4. edit .env and enter values for GITHUB_CLIENT_ID, GITHUB_SECRET, S3_AWS_ACCESS_KEY_ID, S3_AWS_SECRET_ACCESS_KEY, S3_BUCKET_NAME & AWS_REGION captured above
  5. edit config/database.yml and uncomment host and user variables for development and test

Build project

  1. build docker images: docker-compose up --build
  2. run db:create: docker-compose exec website rails db:create
  3. run db:setup: docker-compose exec website rails db:setup

Starting and stopping Docker container services

  1. start - docker-compose up
  2. stop - docker-compose down

Accessing services

  1. The web app can be accessed at http://localhost:3000
  2. The postgresql port is exposed and can be accessed at localhost:5432

Note about first-time Setup

The first time you log into the web app using your GitHub credentials you will get an error stating your user has not been setup with an organization.

I did the following to resolve this issue:

  1. open a rails console window: docker-compose exec website rails c
  2. get my db user object: ">> u = User.where(email: my_email_address).first
  3. update my organization_id and set my admin flag to super user
    • u.organization_id =2
    • u.admin = true
    • u.save

For reference, default data is loaded via the db/seeds.rb file.

Other useful commands

Clone this wiki locally

Morty Proxy This is a proxified and sanitized view of the page, visit original site.