You have two options:
- Create the .env file as already suggested in another answer.
-
Prepend
KEY=VALUE
pair(s) to yourdocker-compose
command, e.g:KB_DB_TAG_VERSION=kb-1.3.20-v1.0.0 docker-compose up
Exporting 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