Consul-tree on Docker
https://github.com/vagharsh/consul-tree
Quick Start
To use the Consul-tree you need PHP and a web server.
From version 6.x and UP the Consul-Tree supports browsing multiple consuls from one UI therefore you can add as many consul (urls, titles) as you would like to connect to as an array / json
Consul-tree on Docker
On the Docker host that you want to run the Consul-tree container from.
consul-tree under a virtual-directory e.g. http://yourserver/consuldirectory
--env "BASE_URI=consul-dev" if you are planning to access it via http://test.domain.com/consul-dev/ docker run -d -v /opt/consul-tree/config:/var/www/html/config \
-p 8123:80 \
--restart always \
--name consul-tree \
--env "BASE_URI=consuldirectory" \
vagharsh/consul-tree
docker run -d -e CONFIG=http://test.abc.com/config.json \
-e AUTH=http://test.abc.com/auth.php \
-p 8123:80 \
--restart always \
--name consul-tree \
vagharsh/consul-tree:7.5.3-web
Note: Make sure that the files are not shared publicly, and that the php file is not hosted on a php server.
-- Provide the config file via Mounting.
docker run -d -v /opt/consul-tree/config:/var/www/html/config \
-p 8123:80 \
--restart always \
--name consul-tree \
vagharsh/consul-tree
--- Mounting the config files separately.
docker run -d -v /opt/consul-tree/config.json:/var/www/html/config/config.json \
-v /opt/consul-tree/auth.php:/var/www/html/config/auth.php \
-p 8123:80 \
--restart always \
--name consul-tree \
vagharsh/consul-tree
** Dockerfile WEB**
FROM php:8.3.4RC1-apache
RUN set -ex; \
apt-get update ;\
apt-get install -y git wget ;\
git clone https://github.com/vagharsh/consul-tree.git ;\
mv consul-tree/* /var/www/html/;\
rm -rf consul-tree/;
COPY run-web.sh /opt/run.sh
ENV CONFIG=$CONFIG
ENV AUTH=$AUTH
CMD ["/opt/run.sh", "run"]
** run-web.sh **
#!/bin/bash
wget $CONFIG -O /var/www/html/config/config.json
wget $AUTH -O /var/www/html/config/auth.php
apache2-foreground
** Dockerfile LOCAL**
FROM php:8.3.4RC1-apache
RUN set -ex; \
apt-get update ;\
apt-get install -y git wget ;\
git clone https://github.com/vagharsh/consul-tree.git ;\
mv consul-tree/* /var/www/html/;\
rm -rf consul-tree/;
CMD ["apache2-foreground"]
Content type
Image
Digest
sha256:ab13fe271…
Size
212.3 MB
Last updated
over 2 years ago
docker pull vagharsh/consul-tree