Starbix / docker-synclounge

🐳 Dockerfile for SyncLounge
https://synclounge.tv
MIT License
19 stars 5 forks source link

Trying to figure out the syntax for a custom server list #11

Closed TheFiZi closed 4 years ago

TheFiZi commented 4 years ago

I'm trying to pass this:

"servers": [
  {
    "name": "plexsync.fizi.ca",
    "location": "Cananananada",
    "url": "https://plexsync.fizi.ca/slserver",
    "logo": ""
  }
]

Into the -servers= parameter for the Docker container. I have tried dropping the "servers": [] portion and including it

I've tried these two commands:

docker run -d --restart unless-stopped --name=SyncLounge -p 65500:8088 -p 65499:8089 -e DOMAIN=plexsync.fizi.ca -e servers=\"servers\":[{\"name\":\"plexsync.fizi.ca\",\"location\":\"Cananananada\",\"url\":\"https:\/\/plexsync.fizi.ca\/slserver\",\"logo\":\"\"}]" starbix/synclounge

docker run -d --restart unless-stopped --name=SyncLounge -p 65500:8088 -p 65499:8089 -e DOMAIN=plexsync.fizi.ca -e servers="{\"name\":\"plexsync.fizi.ca\",\"location\":\"Cananananada\",\"url\":\"https:\/\/plexsync.fizi.ca\/slserver\",\"logo\":\"\"}" starbix/synclounge

Both result in a running docker container but this is what I get for a server list:

Capture

about 50 times.

How am I supposed to use this parameter properly?

jwetzell commented 4 years ago

I don't know if capitalization matters for docker ENV variables (I believe it does) but I have it like this and it works. No escaping quotes or anything

-e SERVERS='[{"name":"Server Name","location":"Server Location","url":"http://servurl.com/slserver","image":"http://loungeurl.com/flags/usa.png"}]'
TheFiZi commented 4 years ago

Thanks for the suggestion, interesting that logo is supposed to be image. Wonder where I got logo from.

I tried this with no luck. Same issue:

-e SERVERS='[{"name":"plexsync.fizi.ca","location":"Cananananada","url":"https://plexsync.fizi.ca/slserver","image":"https://fizi.ca/sheep.jpg"}]'

Wonder if it's having issues with SSL.

I'll just keep passing the settings.json into the container.