custom variables .env
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
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"