File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,11 +31,29 @@ builder_describe \
3131 build \
3232 start \
3333 stop \
34+ list \
3435
3536builder_parse " $@ "
3637
38+ function list_sites() {
39+ builder_echo " The following sites may be proxied:"
40+ local item items
41+ # read -a items= <()
42+ items=($( grep server_name resources/nginx.conf) )
43+ items=($( printf -- ' %s\n' " ${items[@]} " | grep localhost) )
44+ for item in " ${items[@]} " ; do
45+ builder_echo " http://${item} "
46+ done
47+ }
48+
49+ function do_start() {
50+ start_docker_container $PROXY_IMAGE_NAME $PROXY_CONTAINER_NAME $PROXY_CONTAINER_DESC $HOST_PROXY 80 $BUILDER_CONFIGURATION
51+ list_sites
52+ }
53+
3754builder_run_action configure bootstrap_configure
3855builder_run_action clean clean_docker_container $PROXY_IMAGE_NAME $PROXY_CONTAINER_NAME
3956builder_run_action stop stop_docker_container $PROXY_IMAGE_NAME $PROXY_CONTAINER_NAME
4057builder_run_action build build_docker_container $PROXY_IMAGE_NAME $PROXY_CONTAINER_NAME $BUILDER_CONFIGURATION
41- builder_run_action start start_docker_container $PROXY_IMAGE_NAME $PROXY_CONTAINER_NAME $PROXY_CONTAINER_DESC $HOST_PROXY 80 $BUILDER_CONFIGURATION
58+ builder_run_action start do_start
59+ builder_run_action list list_sites
You can’t perform that action at this time.
0 commit comments