Execute command in container without websockets

After deployment of the new version of stack I need to run upgrade script:

$ rancher exec -it projectname-review-master-friuix/web drush updb
An error occurred trying to connect: Post http://%2Ftmp%2Fdocker-sock999983969/v1.18/containers/44d45960cd7af0358317dfdc02675b28f8d27619e18c8b34355d7d51c814b624/exec: read unix @->/tmp/docker-sock999983969: read: connection reset by peer
time="2017-12-21T23:18:39Z" level=error msg="Failed to handle connection: websocket: bad handshake" 
ERROR: Job failed: exit code 1

Proxy what I use for Rancher does not support websockets and rancher exec requires it.

Is there some other way how to run command in deployed container?
Or some other way how to run upgrade scripts (db migration, …) after deployment by GitLab CI (can run almost anything in bash, but we are limited to call only Rancher API)?

No; the agent connection from hosts -> server and live updating of resource state for the UI are also WebSockets, so nothing is going to work in general without them.