Platforms

Envlet on Docker

Pass one variable into the container and start through envlet run. No .env file baked into the image.

Set the token
docker run -e ENVLET_TOKEN=envlet_... acme/api
Dockerfile
RUN npm install -g @envlet/cli
CMD ["envlet", "run", "--", "node", "server.js"]

Set up

  1. 01

    Create a token

    Create an identity for Docker and a token for the environment it deploys.

  2. 02

    Set one secret

    Pass ENVLET_TOKEN with -e, an env_file that holds only that one line, or your orchestrator's secret.

  3. 03

    Start through Envlet

    Install the CLI in the image and make envlet run the CMD, or call inject() from the SDK at boot.

Questions

Will my app start if Envlet is down?
No, and that is the point. It retries for a few seconds, then fails so you notice, instead of starting with half an environment.
Do I still need Docker's own secret store?
Only for ENVLET_TOKEN. Everything else lives in Envlet, so you rotate in one place.

Stop pasting .env files.

One command. The right values for whoever runs it.