Skip to content

Latest commit

 

History

History
71 lines (47 loc) · 1.7 KB

README.md

File metadata and controls

71 lines (47 loc) · 1.7 KB

ZeroIndexed

Monorepo for first party source code that runs under zeroindexed.com.

JavaScript packages are published under the @zeroindexed/ namespace on NPM.

Development

Install nix and nix-direnv (which are part of the rravalBox nix configuration, so that comes for free if you're using it).

Ensure that your nix config supports nix flake.

Then add a file to the root of this repo .envrc:

use flake

Finally:

$ cd /path/to/this/repo

# needed every time `.envrc` changes, rare.
$ direnv allow

# Needed every time `docs/Gemfile.lock` changes, somewhat frequent.
$ (cd docs && bundle install)

# Needed every time `yarn.lock` changes, frequent.
$ yarn install

Deployment

Everything is managed by pulumi, which is already installed in the nix managed environment.

Pulumi

Modify $ZEROINDEXED_CHECKOUT/.envrc:

# Create an access token: https://app.pulumi.com/account/tokens
export PULUMI_ACCESS_TOKEN="..."

# gpg -d packages/pulumi/pulumi.passphrase.gpg
export PULUMI_CONFIG_PASSPHRASE="..."

Google Cloud

Create a service account key and put the key in $ZEROINDEXED_CHECKOUT/.nix/gcloud-key.json: https://console.cloud.google.com/iam-admin/serviceaccounts

kubectl

Generate a configuration file:

$ pulumi -C packages/pulumi stack --stack gcloud --show-secrets output kubeconfig > .nix/kubeconfig