2 enviroment
Luca Matteo Spoljarevic edited this page 2026-03-22 22:04:12 +01:00

.env.example

What's a .env file?

A .env file is an environment file. Things that one or more containers should know like database user, password and so on are saved inside of it.

NEVER PUSH SUCH A FILE TO A REPO!

The only reason you see one inside here is, that it's only an example file. No important data inside of it is used by me, which means I can push it.

Don't push it after you changed things like passwords and so on!

What you need to change

File name

After cloning the repo, change the filename to .env, since that's what the containers are looking for.

You can do this with the following command on Linux:

mv .env.example .env

Variables you need to change

The following variables need to be changed for security reasons:

  • POSTGRES_PASS
  • ELASTICSEARCH_PASS

Variables you can change

Here are some variables you might want to change:

  • Postgres Data
    • POSTGRES_DB
    • POSTGRES_USER
    • POSTGRES_HOST
  • Elasticsearch
    • ELASTICSEARCH_HOST
    • ELASTICSEARCH_PASS
    • ELASTICSEARCH_NAMESPACE
  • Timezone
    • TZ

After that, you should be good to go.