Skip to content
This repository has been archived by the owner on Oct 30, 2022. It is now read-only.

meeshkan/vanity

Repository files navigation

VANITY Logo


Deployment

Deploy with Vercel

Alternatively, to deploy vanity manually:

~ ❯❯❯ npm install -g vercel

2. Create GitHub App

Follow these steps to create a GitHub App.

Make sure the callback URL is set to the vercel alias (or custom domain) that you are going to be using, plus the endpoint /auth/github/callback (i.e., {DOMAIN}.now.sh/auth/github/callback, such as vanity.meeshkan.now.sh/auth/github/callback).

Additionally, change the "Administration" repository permissions and "Email addresses" user premissions to read-only access.

3. Start Redis and PostgreSQL instances

You can use Heroku (i.e., Heroku Postgres and Heroku Redis) or any other service of your choice.

4. Set vercel secrets

Use the vercel secrets command to create a 'secret' for each of the environment variables found in .env.example, in the format specified in the vercel.json file. For example, to create a secret for the GITHUB_CLIENT_ID variable, use the following command:

~ ❯❯❯ vercel secret add @vanity-github-client-id <GITHUB_CLIENT_ID>

5. Deploy to Vercel

~/vanity ❯❯❯ vercel

6. Create an alias

Use the vercel alias command to create your alias.

Development

1. Start Redis and PostgreSQL instances

If you're using Docker, run:

~/vanity ❯❯❯ docker-compose up -d
~/vanity ❯❯❯ # docker-compose down  # Teardown when done

2. Create GitHub App

Follow these steps to create a GitHub App. Make sure the callback URL is set to http://localhost:3000/auth/github/callback. Finally, change the "Administration" repository permissions to read-only access and "Email addresses" user premissions to read-only access as well.

3. Create .env

Create a .env file and populate it with the environment variables specified in the .env.example file.

4. Start development instance

Finally, execute:

~/vanity ❯❯❯ vercel dev

License

MIT © Meeshkan