srothh / ppmrob

ROS drone control
0 stars 0 forks source link

Change way we set env variables in compose file for their better management #33

Closed VrabelPeter closed 7 months ago

VrabelPeter commented 7 months ago

You can use multiple .env files in your compose.yml with the env_file attribute, and Docker Compose reads them in the order specified. If the same variable is defined in multiple files, the last definition takes precedence:

services:
  webapp:
    image: my-webapp-image
    env_file:
    # paths are relative to the location of `compose.yml` file
      - .env
      - .env.override

For example see planner service in docker-compose.yml or documentation from Docker.

VrabelPeter commented 7 months ago

Solved in commits with hashes: 43a6fff4215c45147e371842b57ca9fda8e8d605, 093d0aeb151594a442404222d8af998578c964be