docker-images icon indicating copy to clipboard operation
docker-images copied to clipboard

custom variables .env

Open rafaelfariassenac opened this issue 4 months ago • 1 comments

I got error when I change those variable .env

GLPI_VAR_DIR=/opt/files GLPI_CONFIG_DIR=/opt/files/config GLPI_LOG_DIR=/opt/files/logs

services: glpi: image: "glpi/glpi:latest" restart: "unless-stopped" volumes: - glpi_data:/opt/files:rw
env_file: .env # Pass environment variables from .env file to the container depends_on: db: condition: service_healthy ports: - "80:80"

docker compose up

Image

rafaelfariassenac avatar Oct 31 '25 12:10 rafaelfariassenac

Hello.

The current image indeed declares some env variables for GLPI directories. But they are used for their locations inside the container and not for the purpose of settings folder on the external file system.

The only thing you can move is the root folder, containing all other directories of user's data. Like noted in the README: you can map a volume for /var/glpi container's folder to a local directory. Ex:

services:
  glpi:
   ...
    volumes:
      - "./storage/glpi:/var/glpi:rw"

orthagh avatar Nov 03 '25 13:11 orthagh