Skip to content

Commit

Permalink
feat(setup) configurable backend ip for dev mode WD-3856
Browse files Browse the repository at this point in the history
  • Loading branch information
edlerd committed May 17, 2023
1 parent c380853 commit b7a93cd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ENVIRONMENT=devel
PORT=8407
PORT=8407
LXD_UI_BACKEND_IP=172.17.0.1
6 changes: 6 additions & 0 deletions entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ if [[ ! -z "$LXD_UI_BACKEND_KEY_PEM" ]]; then
# dev config
else
cp haproxy-dev.cfg haproxy-local.cfg
set -o allexport; source .env; set +o allexport
if [ -f .env.local ]
then
set -o allexport; source .env.local; set +o allexport
fi
sed -i "s#LXD_UI_BACKEND_IP#$LXD_UI_BACKEND_IP#" haproxy-local.cfg
# generate certificates for dev environment
if [ ! -d "keys" ]; then
mkdir -p keys
Expand Down
2 changes: 1 addition & 1 deletion haproxy-dev.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ backend lxd_ui
server yarn_serve_port 127.0.0.1:3000

backend lxd_core
server lxd_https 172.17.0.1:8443 ssl verify none crt keys/lxd-ui.pem
server lxd_https LXD_UI_BACKEND_IP:8443 ssl verify none crt keys/lxd-ui.pem

0 comments on commit b7a93cd

Please sign in to comment.