You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.1 KiB

  1. #!/bin/bash
  2. set -e
  3. # make sure there are no old containers or old data around
  4. sudo docker-compose down
  5. sudo rm -rf volumes
  6. mkdir -p volumes/pictrs_{alpha,beta,gamma,delta,epsilon}
  7. sudo chown -R 991:991 volumes/pictrs_{alpha,beta,gamma,delta,epsilon}
  8. sudo docker build ../../ --file ../dev/Dockerfile --tag lemmy-federation:latest
  9. sudo mkdir -p volumes/pictrs_alpha
  10. sudo chown -R 991:991 volumes/pictrs_alpha
  11. sudo docker-compose up -d
  12. pushd ../../ui
  13. echo "Waiting for Lemmy to start..."
  14. while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8540/api/v1/site')" != "200" ]]; do sleep 1; done
  15. while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8550/api/v1/site')" != "200" ]]; do sleep 1; done
  16. while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8560/api/v1/site')" != "200" ]]; do sleep 1; done
  17. while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8570/api/v1/site')" != "200" ]]; do sleep 1; done
  18. while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'localhost:8580/api/v1/site')" != "200" ]]; do sleep 1; done
  19. yarn api-test || true
  20. popd
  21. sudo docker-compose down
  22. sudo rm -r volumes