2020-07-23 22:09:39 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# make sure there are no old containers or old data around
|
|
|
|
sudo docker-compose down
|
|
|
|
sudo rm -rf volumes
|
|
|
|
|
|
|
|
mkdir -p volumes/pictrs_{alpha,beta,gamma}
|
|
|
|
sudo chown -R 991:991 volumes/pictrs_{alpha,beta,gamma}
|
|
|
|
|
|
|
|
sudo docker build ../../ --file ../dev/Dockerfile --tag dev_lemmy:latest
|
|
|
|
|
|
|
|
sudo docker-compose up -d
|
|
|
|
|
|
|
|
pushd ../../ui
|
|
|
|
echo "Waiting for Lemmy to start..."
|
|
|
|
while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8540/api/v1/site')" != "200" ]]; do sleep 1; done
|
|
|
|
while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8550/api/v1/site')" != "200" ]]; do sleep 1; done
|
|
|
|
while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8560/api/v1/site')" != "200" ]]; do sleep 1; done
|
2020-07-24 00:59:22 +00:00
|
|
|
yarn
|
2020-07-24 02:16:36 +00:00
|
|
|
yarn api-test
|
2020-07-23 22:09:39 +00:00
|
|
|
popd
|
|
|
|
|
|
|
|
sudo docker-compose down
|
|
|
|
|
|
|
|
sudo rm -r volumes/
|