2020-07-24 22:06:00 -04:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# make sure there are no old containers or old data around
|
|
|
|
sudo docker-compose down
|
|
|
|
sudo rm -rf volumes
|
|
|
|
|
2020-08-20 08:44:22 -04:00
|
|
|
mkdir -p volumes/pictrs_{alpha,beta,gamma,delta,epsilon}
|
|
|
|
sudo chown -R 991:991 volumes/pictrs_{alpha,beta,gamma,delta,epsilon}
|
2020-07-24 22:06:00 -04:00
|
|
|
|
|
|
|
sudo docker build ../../ --file ../prod/Dockerfile --tag dessalines/lemmy:travis
|
|
|
|
|
|
|
|
sudo docker-compose up -d
|
|
|
|
|
2020-09-15 15:26:47 -04:00
|
|
|
pushd ../../api_tests
|
2020-07-24 22:06:00 -04:00
|
|
|
echo "Waiting for Lemmy to start..."
|
2020-09-15 15:26:47 -04:00
|
|
|
while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8541/api/v1/site')" != "200" ]]; do sleep 1; done
|
|
|
|
while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8551/api/v1/site')" != "200" ]]; do sleep 1; done
|
|
|
|
while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8561/api/v1/site')" != "200" ]]; do sleep 1; done
|
|
|
|
while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8571/api/v1/site')" != "200" ]]; do sleep 1; done
|
|
|
|
while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8581/api/v1/site')" != "200" ]]; do sleep 1; done
|
2020-07-24 22:06:00 -04:00
|
|
|
yarn
|
|
|
|
yarn api-test
|
|
|
|
popd
|
|
|
|
|
|
|
|
sudo docker-compose down
|
|
|
|
|
|
|
|
sudo rm -r volumes/
|