Closed jonasstrehle closed 4 years ago
Closing this issue. It seems that defining the environment variables inside the docker-compose is not working with the recent version. However I'm using a a custom-built image as workaround.
can you explain whats wrong here @jonasstrehle? I am also using docker compose. Is there any problem with docker compose? the environment variable loaded correctly in the container.
because ROOT_PASSWORD
env variable is working fine in my case. But webmin variables is not working, even though it's loaded in the env
.
Got the sam problem
In my case it was because of the following piece of code:
As you see, the first_init()
function only runs if the /data/.initialized
file does not exist (i.e. it is the first initialization). As I was mounting the /data
directory on the host, the file was created the first time I ran the docker-compose file. After removing the .initialized
file manually, the environment variables worked as expected.
environment: - WEBMIN_INIT_SSL_ENABLED=false - WEBMIN_INIT_REFERERS=dns.mydomain.com - WEBMIN_ENABLED=true
You also need to add the following variable WEBMIN_INIT_REDIRECT_PORT=80
in order to redirect to http://dns.mydomain.com:80
after logging in.
I'm not getting webmin for docker-bind working. So I'm using traefik as proxy and listening on the dns.mydomain.com subdomain (SSL).
Navigating to the URI all I'm getting is a 502 Bad Gateway error message. Navigating inside the docker to the internal IP (
curl -G myinternalip:10000
) returns the errorThis web server is running in SSL mode. Try the URL <a href='https://dns-main:10000/'>https://docker-bind:10000/</a> instead.
.Note that in the running container the file /etc/webmin/miniserv.conf does not seems to be changed (SSL=1) instead of SSL=0. Adding a volume mount to override the file (./miniserv.conf:/etc/webmin/miniserv.conf) is not possible due to this error:
rm: cannot remove '/etc/webmin/miniserv.conf': Device or resource busy
I'm not really sure how to go on ... so does anybody know how to fix this? Any help would be really appreciated.
docker-compose.yml service: