Skip to content

Commit

Permalink
feat(scripts): additional scripts to start and simplify development
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnyzzz committed Dec 5, 2018
1 parent a79449e commit 149ffd5
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
18 changes: 18 additions & 0 deletions build-assets.sh
@@ -0,0 +1,18 @@
#!/bin/bash


set -e -u -x

## Building Frontend part with cache in Docker


NODE_IMAGE=node:9

docker pull $NODE_IMAGE

docker run --rm -it \
--env .env \
--volume $(pwd):/src \
--workdir /src \
$NODE_IMAGE \
/bin/bash /src/scripts/build-frontend.sh
46 changes: 46 additions & 0 deletions build-devserver.sh
@@ -0,0 +1,46 @@
#!/bin/bash

set -e -u -x

if [ ! -d _assets ]; then
## TODO: make sure asserts are up-to-date...

## Building Frontend part with cache in Docker
echo ""
echo "Building assets..."
echo ""

./build-assets.sh


echo ""
echo "Assets built!"
echo ""
fi

## Running dev server

# build kotlin-web-site container here
docker build --pull -t kotlin-web-site .

while true; do
echo ""
echo "Running Python web server..."
echo ""

docker run -it --rm \
-v $(pwd):/src \
-p 5000:5000 \
kotlin-web-site \
python /src/kotlin-website.py $@

EXIT_CODE=$?

echo ""
echo "Python existed with $EXIT_CODE"
echo "Restarting..."
sleep 5
done



0 comments on commit 149ffd5

Please sign in to comment.