Skip to content

ripplefm/auth

Repository files navigation

ripple.fm auth service

Authentication and user service for ripple.fm

Acts as an OAuth2 provider for the ripple.fm web client and exposes REST API endpoints for user data.

Table of Contents

Prerequisites

  • yarn or npm
  • Typescript
  • docker and docker-compose

Technologies

This project was built with:

Development

Formatting

This project uses Prettier for formatting. It's recommended to configure your editor to work with prettier using the editor integrations.

Formatting is checked when Travis CI runs a build and can be checked locally using the one of the following commands:

yarn lint

or

npm run lint

Setting up your environment

We must first set the environment variables defined in .env.example. The variables include comments and are marked optional. NOTE: Some variables are not required to run the basic development environment.

The steps for defining your environment variables:

  1. Copy .env.exmaple to .env
  2. Update values for the variables
  3. Source the environment using source .env

Starting the service

Now that we loaded the environment variables we can start the service using docker-compose

To start we run:

$ docker-compose up

To stop:

$ docker-compose down

Production

Deploying

Travis CI will automatically build and push tagged commits (matching the version in package.json) to the docker image repository.

After an image is built and pushed, update the helm chart for ripple.fm to set the updated tag for the auth service.

Notes on configuration

Some notes about deploying to production:

  • Ensure NODE_ENV is set to production
  • the REDIS_PASSOWRD environment variable is optional but recommended

CLI

The auth service includes cli commands defined here. These commands can be used to initialize our service (i.e running migrations or creating oauth2 clients).

About

Authentication server for ripple.fm

Resources

Stars

Watchers

Forks

Packages

No packages published