Skip to content

configuring thruway to run on heroku #95

Description

@tacman

I have an application running on heroku, and I'd like to integrate Thruway, it's working locally, but not sure how to configure it to run remotely.

The Procfile simply runs a worker in a dyno:

web:  vendor/bin/heroku-php-nginx -C heroku-nginx.conf public/
worker: bin/console thruway:process:start -vvv

my configuration uses an environment variable to

voryx_thruway:
  realm: 'realm1'
  url: '%env(WAMP_SERVER)%' #The url that the clients will use to connect to the router
  router:
    ip: 127.0.0.1  # the ip that the router should start on
    port: 8080  # public facing port.  If authentication is enabled, this port will be protected
    trusted_port: 8081 # Bypasses all authentication.  Use this for trusted clients.
    authentication: false # true will load the AuthenticationManager
  user_provider: 'fos_user.user_provider.username'

the environment variable is set to the public port

WAMP_SERVER=ws://myapplication.herokuapp.com:8081

Heroku only allows one free dyno, so I couldn't run the router and worker independently. At one point, I thought there was a free public WAMP router (crossbar.io) that could be used for applications like this, where you didn't wan to run your own router, but perhaps I'm mistaken, as I can't find anything like that now.

Any suggestions on how to proceed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions