run-local.sh 646 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
  3. if [ "$(docker ps -a | grep webdav-js-app)" ]; then
  4. docker stop webdav-js-app
  5. docker rm webdav-js-app
  6. fi
  7. docker run -dit \
  8. --name webdav-js-app \
  9. -p 8080:80 \
  10. -v $DIR/../examples/apache-directory-list-local/webdav.conf:/etc/apache2/sites-enabled/webdav.conf:ro \
  11. -v $DIR/../:/var/www/webdav-js:ro \
  12. webdav-js sleep infinity
  13. docker exec -it webdav-js-app /bin/bash -c "\
  14. chown www-data -R /var/www/html 2> /dev/null; \
  15. rm /etc/apache2/sites-enabled/000-default.conf; \
  16. apachectl start || apachectl restart \
  17. "
  18. echo 'This can be tested on http://localhost:8080'