You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
docker-compose down
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
export SEALIOUS_PORT=$1
|
|
|
|
export SEALIOUS_BASE_URL=$2
|
|
|
|
|
|
|
|
docker-compose down
|
|
|
|
docker-compose up -d db
|
|
|
|
./npm.sh ci
|
|
|
|
./npm.sh run build:back;
|
|
|
|
./npm.sh run build:front;
|
|
|
|
|
|
|
|
rm -f log.txt
|
|
|
|
|
|
|
|
CONTAINER=$(docker-compose run --user="$UID"\
|
|
|
|
-e "SEALIOUS_MONGO_PORT=27017" \
|
|
|
|
-e "SEALIOUS_MONGO_HOST=db" \
|
|
|
|
-e "SEALIOUS_PORT=$SEALIOUS_PORT" \
|
|
|
|
-e "SEALIOUS_BASE_URL=$SEALIOUS_BASE_URL" \
|
|
|
|
-p ${SEALIOUS_PORT}:${SEALIOUS_PORT} \
|
|
|
|
-d \
|
|
|
|
test \
|
|
|
|
/bin/sh -c "{ node . --color 2>&1; } | ./node_modules/.bin/ansi-html-stream > log.html")
|
|
|
|
|
|
|
|
echo "App started on $SEALIOUS_PORT"
|
|
|
|
|
|
|
|
echo "App running in container $CONTAINER"
|
|
|
|
|
|
|
|
sleep 1
|
|
|
|
|
|
|
|
echo "Docker logs so far:"
|
|
|
|
|
|
|
|
docker logs "$CONTAINER"
|