You have two options:
- Create the .env file as already suggested in another answer.
-
Prepend
KEY=VALUEpair(s) to yourdocker-composecommand, e.g:KB_DB_TAG_VERSION=kb-1.3.20-v1.0.0 docker-compose upExporting it earlier in a script should also work, e.g.:
export KB_DB_TAG_VERSION=kb-1.3.20-v1.0.0 docker-compose up