soketi / docs

The official soketi documentation. 📡
https://docs.soketi.app
59 stars 30 forks source link

Configuring Soketi Docker Container #8

Closed Purtl closed 2 years ago

Purtl commented 2 years ago

Heyho! Love the Idea of Soketi! Really helps avoiding Setup stuff and just get to work.

TLTR: I'd like to know how to configure the soketi/pws docker in terms of: PUSHER_APP_KEY and how to enforce Authorized connections

I have to admit, that my last dive into docker was a while ago and I'm still wearing my water wings when encountering them. And on the top of it all, I never dealt with Pusher... so sorry for what is about to come:

I'm kind'a puzzled on how to configure soketi/pws docker. I'd assume some env variables to set, but neither the Docker Installation Guide nor the Backend Configuration Guide seem to define any. Most probably this feature request is what I am looking for. Or do I have the completely wrong Idea?

For myself I just need the app-key and authorized connections, like mentioned above. Some other useful lads could be: (Didn't try any of them, but just to start a list somewhere)

PUSHER_APP_KEY (this one I tried to set for the container, but nothing happend) PUSHER_APP_SECRET PUSHER_APP_ID PUSHER_HOST PUSHER_PORT PUSHER_SCHEMA (so far basically stolen from here) PUSHER_AUTH_ONLY (I completely made this one up for enforcing the Auth connections behaviour mentioned earlier) PUSHER_AUTH_TIMEOUT (for the auth connections timeout) PUSHER_PING_PONG_TIMEOUT (the ping pong timeout)

Thanks for reading til here, if now someone could point me in an 'about-helpful' direction, that would be awesome!

Then, have a nice weekend!

rennokki commented 2 years ago

Hi @Purtl, let's break it down.

Starting with 0.13 or so, pws got rebranded to soketi. I think you're still using the old version (which was kept for reverse compatibility issues like this one 😁). So I'm going to refer to the last version of soketi to answer your questions.

PUSHER_APP_KEY (this one I tried to set for the container, but nothing happened) PUSHER_APP_SECRET PUSHER_APP_ID PUSHER_HOST PUSHER_PORT

I do indeed believe that the configuration can be hard to find. I will be working on this to make the configuration easier. What you want to configure is the array driver. In Docker, you can run the app by giving environment variables values:

docker run -p 6001:6001 -e DEFAULT_APP_ID=some-id -e DEFAULT_APP_KEY=some-key -e DEFALT_APP_SECRET=some-secret quay.io/soketi/soketi:0.17-16-alpine

PUSHER_AUTH_ONLY (I completely made this one up for enforcing the Auth connections behavior mentioned earlier) PUSHER_AUTH_TIMEOUT (for the auth connections timeout) PUSHER_PING_PONG_TIMEOUT (the ping pong timeout)

These ones are not configurable and I don't think they will be configurable in the future. We stick to the Pusher protocol and the authentication is always on, the timeout for authentication is undefined and the Ping-Pong timeout is set to the protocol definition (120 seconds).

PUSHER_SCHEMA

This is defined on whether you configure it with SSL or not. In your SDK/client configuration, you might want to enable it in production and eventually use non-SSL in development.

Purtl commented 2 years ago

Hi! Sorry for the long response time. I got everything to work! Thank you so much!