neko/.docker/rebuild-server

22 lines
498 B
Plaintext
Raw Permalink Normal View History

2021-04-02 10:18:50 +13:00
#!/bin/bash
if [ -f ".env.default" ]
then
export $(cat .env.default | sed 's/#.*//g' | xargs)
fi
if [ -f ".env" ]
then
export $(cat .env | sed 's/#.*//g' | xargs)
fi
# use -f to force rebuild
if [ "$(docker images -q neko_dev_server 2> /dev/null)" == "" ] || [ "$1" == "-f" ]; then
docker build -t neko_dev_server -f base/Dockerfile --target server ../
fi
docker run --rm -it \
-v "${PWD}/../server:/src" \
--entrypoint="go" \
2021-04-04 02:17:50 +13:00
neko_dev_server build -o "bin/neko" "cmd/neko/main.go"