.secrets -

my‑project/ │ ├─ src/ ├─ tests/ ├─ .gitignore └─ .. (outside) .secrets Add a rule to your .gitignore (or the ignore file of whatever VCS you use):

version: "3.9" services: web: build: . env_file: - .secrets # injected into container at runtime ports: - "8000:8000" .secrets

# Secrets .secrets .secrets.* (using an env file) my‑project/ │ ├─ src/ ├─ tests/ ├─

# 1️⃣ Ensure the file exists and is chmod 600 touch .secrets && chmod 600 .secrets .secrets