Skip to content
Ameen Abozaid
Planned lessonJNR-050-L03

Environment and secrets

  • Lesson 3 of 5
  • Junior
On This Lesson 4 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

supply configuration without committing secrets.

Planned topics

  • Use ${VAR} in compose.yaml; values come from your shell or an .env file.
  • Commit .env.example with fake values; add .env to .gitignore.
  • env_file: loads many variables into one service.
  • Environment variables are for local development; real secrets use a secret manager in deployed environments.
  • Never commit real passwords, even "temporary" ones.
Draft outline details

Demonstration

POSTGRES_PASSWORD: ${DB_PASSWORD} with .env.example containing DB_PASSWORD=change-me.

Check your understanding

Which file is committed: .env or .env.example?

Show answer

.env.example.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.