Skip to content

A private npm registry authenticated with github organization oauth

Notifications You must be signed in to change notification settings

OrigenStudio/verdaccio-heroku-docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

verdaccio-heroku-docker

A containerized verdaccio private npm registry configured with github oauth and AWS S3 storage.

Deployment

You can deploy to heroku with one click

Deploy

Server configuration

Auth (GitHub)

Once the app has been deployed, you will need to setup a github oauth app and add the necessary oauth credentials as heroku config vars.

Follow these instructions when creating the oauth app.

Add the following config vars to the heroku app. Either do this from the heroku dashboard or with the cli.

GITHUB_OAUTH_ORG
GITHUB_OAUTH_CLIENT_ID
GITHUB_OAUTH_CLIENT_SECRET

You should now be able to visit the heroku app and login with your github account by clicking the login button and going through the oauth flow.

Storage (AWS S3)

AWS configuration steps:

  1. create private S3 bucket
  2. create policy through IAM dashboard to allow access to the bucket. Example:
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowObjectManagement",
      "Effect": "Allow",
      "Action": "s3:*",
      "Resource": ["arn:aws:s3:::BUCKET_NAME", "arn:aws:s3:::BUCKET_NAME/*"]
    }
  ]
}
  1. (optional) create user and write down the credentials
  2. attach policy to the desired user. Alternativelly, you can attach the policy and user to a group

Once you have the user credentials, add the following config vars to the heroku app. Either do this from the heroku dashboard or with the cli.

S3_BUCKET
S3_REGION
S3_ACCESS_KEY_ID
S3_SECRET_ACCESS_KEY

About

A private npm registry authenticated with github organization oauth

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 100.0%