Self-Hosted Workers
For example, say you have a server running with access to the internet and docker installed. Once you have obtained your token from your account, all you'd need to do to launch your worker is:
Linux
Mac
Windows
mkdir -p ~/.sling && cd ~/.sling
echo '
worker:
token: xxxxxxxxxxxxxx
' >> env.yaml
docker run -d -v ~/.sling:/root/.sling --restart always --name sling-worker slingdata/sling-worker
mkdir -p ~/.sling && cd ~/.sling
echo '
worker:
token: xxxxxxxxxxxxxx
' >> env.yaml
docker run -d -v ~/.sling:/root/.sling --restart always --name sling-worker slingdata/sling-worker
# Using Powershell
mkdir -Force -p ~/.sling ; cd ~/.sling
echo "
worker:
token: xxxxxxxxxxxxxx
" >> env.yaml
docker run -d -v "$env:USERPROFILE\.sling":/root/.sling --restart always --name sling-worker slingdata/sling-worker
And say you would like to create private connection URLs (where user, password and host information are not shared with our Controller instance), you would simply add them to the Sling Env File file. The docker-compose.yaml file is set to read it.
This way you can simply refer to them from the Sling App by their names, such as
POSTGRES_CONN
and MYSQL_CONN
. The connection credentials will never be shared with the Controller instance, only the name and connection type is shared.Last modified 3mo ago