2020-04-24 16:30:31 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
2020-07-03 12:20:28 +00:00
|
|
|
# make sure there are no old containers or old data around
|
2020-08-31 15:26:32 +00:00
|
|
|
sudo docker-compose down
|
2020-07-03 12:20:28 +00:00
|
|
|
sudo rm -rf volumes
|
|
|
|
|
2020-08-20 12:44:22 +00:00
|
|
|
mkdir -p volumes/pictrs_{alpha,beta,gamma,delta,epsilon}
|
|
|
|
sudo chown -R 991:991 volumes/pictrs_{alpha,beta,gamma,delta,epsilon}
|
2020-07-01 12:54:29 +00:00
|
|
|
|
2020-08-31 15:26:32 +00:00
|
|
|
sudo docker build ../../ --file ../dev/Dockerfile --tag lemmy-federation:latest
|
2020-04-24 16:30:31 +00:00
|
|
|
|
2020-07-01 12:54:29 +00:00
|
|
|
sudo mkdir -p volumes/pictrs_alpha
|
|
|
|
sudo chown -R 991:991 volumes/pictrs_alpha
|
2020-06-27 18:54:42 +00:00
|
|
|
|
2020-08-31 15:26:32 +00:00
|
|
|
sudo docker-compose up -d
|
2020-04-24 16:30:31 +00:00
|
|
|
|
2020-09-15 19:26:47 +00:00
|
|
|
pushd ../../api_tests
|
2020-04-24 16:30:31 +00:00
|
|
|
echo "Waiting for Lemmy to start..."
|
2020-09-15 19:26:47 +00: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
|
|
|
|
yarn
|
2020-04-24 16:30:31 +00:00
|
|
|
yarn api-test || true
|
|
|
|
popd
|
|
|
|
|
2020-08-31 15:26:32 +00:00
|
|
|
sudo docker-compose down
|
2020-04-24 16:30:31 +00:00
|
|
|
|
2020-08-31 15:26:32 +00:00
|
|
|
sudo rm -r volumes
|