Drawdance 0.3.0
Pre-releaseDOWNLOADS:
-
zip: https://github.com/drawpile/Drawdance/releases/download/v0.3.0/drawdance-web-0.3.0.zip
-
tar.gz: https://github.com/drawpile/Drawdance/releases/download/v0.3.0/drawdance-web-0.3.0.tar.gz
This is a really early pre-release version of the web version of Drawdance, a Drawpile client. This is a server component that runs on Linux servers. See https://github.com/drawpile/Drawdance
To run this:
Copy this directory to the server you want to host Drawdance on. Ideally this is the same box as your Drawpile server runs on.
Then run the WebSocket server proxy. It will serve the Drawdance application and forward connections to your actual Drawpile server. Here's an example how to do it with a Drawpile server running under the default port on localhost, using Let's Encrypt Certbot certificates (replace YOUR-DOMAIN with the appropriate value) and listening on port 443 (which requires root):
./drawdance-server-proxy \
-dir=public \
-tls=true \
-cert=/etc/letsencrypt/live/YOUR-DOMAIN/cert.pem \
-key=/etc/letsencrypt/live/YOUR-DOMAIN/privkey.pem \
-listen=0.0.0.0:443 \
-proxy=127.0.0.1:27750
If you're running this on a terminal, you can also pass -color=true to make the log output colorful. Don't do that when you're writing the logs to files though. There's more options too, -help will show them.
You MUST have TLS certificates for your domain, otherwise the browser will refuse to make a WebSocket connection. You can relatively easily generate some using Certbot: https://certbot.eff.org/
You MUST use an IP address for the -proxy and -listen options, domain names are not supported! If you need that, you'll have to build the proxy yourself: https://github.com/drawpile/Drawdance/tree/main/server
If you want to run this under a different base URL than /, you also need to pass the -files-root and -ws-root options, as well as modify the targetUrl in public/drawdance-config.js accordingly. For example, when you want to serve from /drawdance:
./drawdance-server-proxy \
-files-root=/drawdance \
-ws-root=/drawdance/ws \
# ...and all the other options from above
And in public/drawdance-config.js:
// This function is the first option after the comments.
targetUrl: (function () {
return `wss://${window.location.host}/drawdance/ws`;
// ^^^^^^^^^
// this here
})(),
And if you want to set your nginx to forward there, you need to use a configuration that sets the WebSocket headers appropriately, like this:
server {
listen 8080;
location /drawdance {
proxy_pass http://localhost:27751;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}