Docker - Confused on Env #35
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
How can I disable the Network & Speedtest sections if my LookingGlass is only for one host.
I tried to set env variables in the
docker-compose.yml
file as the readme says, but using this doesn't work:LG_BLOCK_NETWORK: 'false';
LG_BLOCK_SPEEDTEST: 'false';
Also confused on if I set this as true:
ENABLE_CUSTOM_BLOCK
, where should the files go when using Docker, which directory?The Docker part still needs some more love, but as you can see in the
config.php
not all options are moved to environment variables, still hardcoded. If you want to run this in Docker I would recommend you to edit the config file. For the custom block you will need to mount the files.A fast fix would be not to use Docker, spin up a VM and follow the instructions, do a git pull and enjoy 😄
Hey, wouldn't it be appropriate this issue stays open till this is resolved, as it seems important for Docker users for those other Environment variables to be editable, thanks.
cc: @evanebb
I've added environment variables to disable these blocks in the Docker container config file in https://github.com/hybula/lookingglass/pull/37. These are:
Also see the updated
docker-compose.yml
in my PR for reference.To your second question, I'm not completely familiar with how the custom block works, but it seems that if the
ENABLE_CUSTOM_BLOCK
environment variable is passed it'll include a few different paths:979b1e081e/docker/php-fpm/src/config.php (L32-L40)
So you can either provide these files through a bind mount in the
docker-compose.yml
, which can be done by adding something like the following to the service definition for the PHP-FPM container:(make sure to replace the
/host/path/to/
bit with the actual path at which the files are located on the host)Another way is to bake them into the container image itself, simply by placing the
custom.html.php
,custom.post.php
,custom.header.php
and/orcustom.footer.php
in the root of the cloned repository and rebuilding the container image; the.dockerignore
file/COPY
statements for the Dockerfile aren't very strict, so they'll just be copied into the final container image.I've additionally added some robuster checks for the custom block files in my PR, so that you won't get include errors in case you don't want/need to supply all of the custom files.