1.4.0 • Published 1 year ago

@thematrixsg/demeter v1.4.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Demeter

Provision environment variable files using template

Build and Publish NPM package

  • Make changes on index.js
  • Bump version (on package.json file)
npm publish

Build and Publish Docker image

Q: I want to push new update for demeter (templating logic)

A: Do this!

# modify exisiting "tailscale-vault-nodejs-demeter" (base) image
# by replacing the "demeter file" then create new image out of it
npm run build-image

# publish new "tailscale-vault-nodejs-demeter-light"
npm run publish-image

Or

Q: I want to update the base image (versions) of tailscale/vault/nodejs

A: Do this!

# re-build the base image, based on Dockerfile.base
npm run build && docker build . -f "Dockerfile.base" -t thematrixsg/tailscale-vault-nodejs-demeter

# push new base image
docker push thematrixsg/tailscale-vault-nodejs-demeter

Usage

Before run make sure:

  • demeter dependencies already installed
  • navigate to root project folder
  • "vault.env" exists on cwd (typically root project folder)
  • run node ./demeter/index.js {dev,stg,prod}

Templates folder pattern:

{root_app_folder}/config/{dev,stg,prod}/**/*.j2

Lookup method spec:

SOME_ENV=lookup_kv("{VAULT_ENGINE}", "{VAULT_SECRET_NAME}:{SECRET_FIELD_KEY}")

TODO:

  • Should be able to run "get kv" asynchronously
  • Lotta error handling on "...Sync()" calls
  • Vault variables standarization esp. for VAULT_ENGINE, VAULT_SECRET_NAME, SECRET_FIELD_KEY
  • unit test
1.2.0

1 year ago

1.4.0

1 year ago

1.1.3

1 year ago

1.3.0

1 year ago

1.1.1

1 year ago

1.1.2

1 year ago

1.1.0

1 year ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago