# My own App - docker deployed to openvidu server

**URL:** <https://openvidu.discourse.group/t/my-own-app-docker-deployed-to-openvidu-server/2377>\
**Category:** Issues developing apps\
**Tags:** v2\
**Created:** [December 6, 2020, 4:11pm UTC](https://openvidu.discourse.group/t/my-own-app-docker-deployed-to-openvidu-server/2377 "2020-12-06T16:11:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Richard\_Burford](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/richard_burford/32/818_2.png) [@Richard\_Burford](https://openvidu.discourse.group/u/Richard_Burford)\
**Post date:** [December 6, 2020, 4:11pm UTC](https://openvidu.discourse.group/t/my-own-app-docker-deployed-to-openvidu-server/2377/1 "2020-12-06T16:11:12Z")

</div>

I have my own app (based largely on tutorial - Get A room) a one to many program in nodeJS.

I have this working on a separate server. But I wanted to dockerise and deploy on the same server as openvidu.

I have followed the deployment guide but, I am unable to connect to the app, I get a 502 bad gateway when accessing the root URL.

nginx logs shows this error

nginx\_1 | 2020/12/06 15:44:10 [error] 79#79: \*1 upstream prematurely closed connection while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: [xxxxxx.xxxx.com](http://xxxxxx.xxxx.com), request: “GET / HTTP/1.1”, upstream: “[http://127.0.0.1:5442/](http://127.0.0.1:5442/)”, host: “[xxxxxx.xxxx.com](http://xxxxxx.xxxx.com)”

My server.js is listening to port 5000, and the docker-compose-ovveride.yml is configured like this

```
app:
    image: xxx/xxx:latest
    restart: on-failure
    ports:
        - "5442:5000"
    environment:
        - SERVER_PORT=5442
        - OPENVIDU_URL=http://localhost:5443
        - OPENVIDU_SECRET=${OPENVIDU_SECRET}
        - CALL_OPENVIDU_CERTTYPE=${CERTIFICATE_TYPE}
    logging:
        options:
            max-size: "${DOCKER_LOGS_MAX_SIZE:-100M}"

```

I am able to access the page by https://:5442

any help greatly appreciated…

Richard

---

<div class="post-metadata">

**Author:** ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)\
**Post date:** [December 7, 2020, 1:49pm UTC](https://openvidu.discourse.group/t/my-own-app-docker-deployed-to-openvidu-server/2377/2 "2020-12-07T13:49:08Z")

</div>

Try to use network host. If your app is available in [http://127.0.0.1:5442](http://127.0.0.1:5442) there should be no problem. Try to access some endpoint in your server by using `curl` and `http://127.0.0.1:5442`. If you’re able to access it, the nginx proxy should be able to redirect all requests.

Regards,  
Carlos

---

<div class="post-metadata">

**Author:** ![Richard\_Burford](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/richard_burford/32/818_2.png) [@Richard\_Burford](https://openvidu.discourse.group/u/Richard_Burford)\
**Post date:** [December 7, 2020, 3:23pm UTC](https://openvidu.discourse.group/t/my-own-app-docker-deployed-to-openvidu-server/2377/3 "2020-12-07T15:23:43Z")

</div>

Hi Carlos,

Many thanks for the reply… I eventually made it work… What I missed was changing the node server from https to http…

Many thanks,

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Burford](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/richard_burford/32/818_2.png) [@Richard\_Burford](https://openvidu.discourse.group/u/Richard_Burford)\
**Post date:** [December 7, 2020, 3:25pm UTC](https://openvidu.discourse.group/t/my-own-app-docker-deployed-to-openvidu-server/2377/4 "2020-12-07T15:25:17Z")

</div>

great software by the way… really appreciate your work!  
🙂
