Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

1. Local Development πŸ‘©β€πŸ’»

Gary edited this page May 13, 2022 · 7 revisions

To develop this app copy .env.example to .env file and populate:

SLACK_SIGNING_SECRET=
SLACK_OAUTH_TOKEN=
DB_HOST=
DB_USER=
DB_PASSWORD=
ECR_URL=[not required for local development]
SECRET_KEY_BASE=[not required for local development]

Populating the Variables πŸ§ͺ

Navigate to api.slack.com/apps. Here you should be able to see the CloudOpsBot Slack App. (If you do not you are not a designated Collaborator, contact a member of the team to be added).

  • SLACK_SIGNING_SECRET is listed under App Credentials > 'Signing Secret'

  • SLACK_OAUTH_TOKEN is under OAuth & Permissions > 'Bot User OAuth Token'

The DB_* variables are for local development and you can set these to whatever you please.

  • DB_HOST + DB_PASSWORD + DB_USER

  • ECR_URL + SECRET_KEY_BASE are not required for local development for information on gathering these please see the Remote Deployment guide.

Common Errors 😒

You will see Failure/Error: hex_hash = OpenSSL::HMAC.hexdigest(digest, signing_secret, sig_basestring) when running RSpec if the file is not present.

Make Targets 🎯

  • make build - Builds the container.
  • make start-db - Starts the database container.
  • make db-setup - Initialise the database.
  • make migrate - Runs the database migration post db-setup.
  • make serve - Serve the Application.
  • make run - Points to make serve.
  • make test - Run all RSpec tests.
  • make stop - Stop the application.
  • make deploy - Upgrade the helm chart.