From 28959c098e80c6822f3d283de4013bbe89107a17 Mon Sep 17 00:00:00 2001 From: caleb crome Date: Mon, 16 Jan 2023 22:04:36 -0800 Subject: [PATCH] Fix boxesserver commit 0a8dcf0e37880c056d85523cdea97d8c8b166c6e caused the server to *only* respond to localhost by default. This causes the Docker to not respond properly. The old server had the default server name as '', but the new one set it to 'localhost'. This fixes that problem. In addition, This commit changes the docker file so that you can specify which git repo and commit to check out from. This allows trivial testing of other clones. The default branch is master and default git repo is Florian's, but you can now specify new commits and/or branches to clone with ```docker build --build-arg BUILD_BRANCH= --build-arg BUILD_REPO=``` --- scripts/Dockerfile | 5 ++++- scripts/boxesserver | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/Dockerfile b/scripts/Dockerfile index 40d6f89..995e88f 100644 --- a/scripts/Dockerfile +++ b/scripts/Dockerfile @@ -17,7 +17,10 @@ FROM fedora:latest RUN dnf install -y git-core python3-markdown python3-setuptools python3-affine python3-shapely pstoedit && dnf clean all # Get Boxes.py sources to /boxes -RUN git clone --depth 1 -b master https://github.com/florianfesti/boxes.git +ARG BUILD_BRANCH=master +ARG BUILD_REPO=https://github.com/florianfesti/boxes.git +RUN git clone ${BUILD_REPO} && cd boxes && git checkout ${BUILD_BRANCH} +RUN chmod +x /boxes/scripts/boxesserver # Internal port used EXPOSE 8000 diff --git a/scripts/boxesserver b/scripts/boxesserver index fdc23c7..1ad7502 100755 --- a/scripts/boxesserver +++ b/scripts/boxesserver @@ -565,7 +565,7 @@ if __name__=="__main__": parser = argparse.ArgumentParser() - parser.add_argument("--host", default="localhost") + parser.add_argument("--host", default="") parser.add_argument("--port", type=int, default=8000) parser.add_argument("--url_prefix", default="", help="URL path to Boxes.py instance")