File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,14 +13,19 @@ source "${SCRIPT_DIR}/lib.sh"
1313[[ -n ${VERBOSE:- } ]] && set -x
1414set -euo pipefail
1515
16+ CODER_DEV_ACCESS_URL=" ${CODER_DEV_ACCESS_URL:- http:// 127.0.0.1: 3000} "
1617DEFAULT_PASSWORD=" SomeSecurePassword!"
1718password=" ${CODER_DEV_ADMIN_PASSWORD:- ${DEFAULT_PASSWORD} } "
1819use_proxy=0
1920
20- args=" $( getopt -o " " -l use-proxy,agpl,password: -- " $@ " ) "
21+ args=" $( getopt -o " " -l access-url:, use-proxy,agpl,password: -- " $@ " ) "
2122eval set -- " $args "
2223while true ; do
2324 case " $1 " in
25+ --access-url)
26+ CODER_DEV_ACCESS_URL=" $2 "
27+ shift 2
28+ ;;
2429 --agpl)
2530 export CODER_BUILD_AGPL=1
2631 shift
@@ -131,7 +136,7 @@ fatal() {
131136 trap ' fatal "Script encountered an error"' ERR
132137
133138 cdroot
134- start_cmd API " " " ${CODER_DEV_SHIM} " server --http-address 0.0.0.0:3000 --swagger-enable --access-url " http://127.0.0.1:3000 " --dangerous-allow-cors-requests=true " $@ "
139+ start_cmd API " " " ${CODER_DEV_SHIM} " server --http-address 0.0.0.0:3000 --swagger-enable --access-url " ${CODER_DEV_ACCESS_URL} " --dangerous-allow-cors-requests=true " $@ "
135140
136141 echo ' == Waiting for Coder to become ready'
137142 # Start the timeout in the background so interrupting this script
You can’t perform that action at this time.
0 commit comments