# Deploy recording using docker

**URL:** <https://openvidu.discourse.group/t/deploy-recording-using-docker/2534>\
**Category:** Issues with deployment\
**Tags:** v2\
**Created:** [January 5, 2021, 6:35pm UTC](https://openvidu.discourse.group/t/deploy-recording-using-docker/2534 "2021-01-05T18:35:23Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![rakshithsm](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/rakshithsm/32/1250_2.png) [@rakshithsm](https://openvidu.discourse.group/u/rakshithsm)\
**Post date:** [January 5, 2021, 6:35pm UTC](https://openvidu.discourse.group/t/deploy-recording-using-docker/2534/1 "2021-01-05T18:35:23Z")

</div>

I am trying to learn about openvidu products and I’ve successfully learnt how to build a few custom apps as well. I love how well engineered this product is.  
I came across the tutorial for recording using node and wanted to deploy it. After some digging around (a whole lot of trials and errors for a few days) I realized that I could do this just by swapping out the `image: openvidu/openvidu-call:2.16.0` with the image for `openvidu/openvidu-recording:2.16.0` in the `docker-compose.override.yml`. But That didn’t work. Can you please tell me what changes I need to make in the docker-compose to get this to work?

---

<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:** [January 7, 2021, 11:46am UTC](https://openvidu.discourse.group/t/deploy-recording-using-docker/2534/2 "2021-01-07T11:46:18Z")

</div>

No, that’s not how it works.  
Recordings are automatically launched by OpenVidu Server.

You don’t need to replace `openvidu/openvidu-call:2.16.0` with `openvidu/openvidu-recording:2.16.0`

In the docker-compose.override.yml should be your containerized node app running at port 5442.  
Take a look here: [OpenVidu Docs](https://docs.openvidu.io/en/2.16.0/deployment/deploying-openvidu-apps/)

---

<div class="post-metadata">

**Author:** ![rakshithsm](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/rakshithsm/32/1250_2.png) [@rakshithsm](https://openvidu.discourse.group/u/rakshithsm)\
**Post date:** [January 10, 2021, 7:47am UTC](https://openvidu.discourse.group/t/deploy-recording-using-docker/2534/3 "2021-01-10T07:47:05Z")

</div>

Thank you for the Reply. I tried what you proposed. I am using the openvidu-recording-node tutorial application in this case. (I have installed the app natively)

1. I changed the app to use ‘http’ instead of ‘https’. `var https = require('http');`
2. The app is listening on port `5442` instead of the default `5000`
3. `var OPENVIDU_URL = http://localhost:5443`
4. `var OPENVIDU_SECRET = "MY_SECRET";`

I am now seeing an 404 for https://…/api/get-token and upon changing it to use http in the front end I get an error `Blocked loading mixed active content`. How can I rectify this?

---

<div class="post-metadata">

**Author:** ![vipin\_mishra](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/vipin_mishra/32/32_2.png) [@vipin\_mishra](https://openvidu.discourse.group/u/vipin_mishra)\
**Post date:** [January 10, 2021, 8:22am UTC](https://openvidu.discourse.group/t/deploy-recording-using-docker/2534/4 "2021-01-10T08:22:35Z")

</div>

you are using openvidu on server or local ?  
and where is your nodejs app in same server or different server or local ?  
Thanks  
Vipin

---

<div class="post-metadata">

**Author:** ![rakshithsm](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/rakshithsm/32/1250_2.png) [@rakshithsm](https://openvidu.discourse.group/u/rakshithsm)\
**Post date:** [January 10, 2021, 7:31pm UTC](https://openvidu.discourse.group/t/deploy-recording-using-docker/2534/5 "2021-01-10T19:31:13Z")

</div>

AWS EC2 instance - both openvidu and nodejs app are hosted on there

---

<div class="post-metadata">

**Author:** ![rakshithsm](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/rakshithsm/32/1250_2.png) [@rakshithsm](https://openvidu.discourse.group/u/rakshithsm)\
**Post date:** [January 11, 2021, 4:29am UTC](https://openvidu.discourse.group/t/deploy-recording-using-docker/2534/6 "2021-01-11T04:29:44Z")

</div>

Every time I perform a `POST` request, I think `NGINX` is redirecting it to use `https` and in the process changing the `POST` to a get `GET`.

Here are the changes I made in the `.env`

```auto
DOMAIN_OR_PUBLIC_IP=ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com
OPENVIDU_SECRET=MY_SECRET

```

and `server.js`

```auto
var https = require('http');
https.createServer(options, app).listen(5442);
var OPENVIDU_URL = "http://localhost:5443";
var OPENVIDU_SECRET = "MY_SECRET";

```

---

<div class="post-metadata">

**Author:** ![vipin\_mishra](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/vipin_mishra/32/32_2.png) [@vipin\_mishra](https://openvidu.discourse.group/u/vipin_mishra)\
**Post date:** [January 11, 2021, 4:20pm UTC](https://openvidu.discourse.group/t/deploy-recording-using-docker/2534/7 "2021-01-11T16:20:08Z")

</div>

I Will say use your openvidu domain instead localhost

---

<div class="post-metadata">

**Author:** ![rakshithsm](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/rakshithsm/32/1250_2.png) [@rakshithsm](https://openvidu.discourse.group/u/rakshithsm)\
**Post date:** [January 11, 2021, 5:21pm UTC](https://openvidu.discourse.group/t/deploy-recording-using-docker/2534/8 "2021-01-11T17:21:32Z")

</div>

> [@rakshithsm](#):
>
> `var OPENVIDU_URL = "http://localhost:5443";`

changed it to

```auto
var OPENVIDU_URL = "http://ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com:5443";

```

Still on the same error. All `get` requests to the application server i.e the node server are going through, but for `post` requests i get a `cannot GET /api/get-token` (when queried using postman, get-token is a `post` method) or a  
`Request of TOKEN gone WRONG: (404) {"timestamp":"2021-01-11T17:05:04.361+00:00","status":404,"error":"Not Found","message":"","path":"/api/get-token"}` on the console warning

I’m wondering if I have correctly followed the “Application must be server in plain http, without https.” instruction. Maybe `NGINX` is rerouting `http` requests to `https` and this is screwing things up somehow?

---

<div class="post-metadata">

**Author:** ![vipin\_mishra](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/vipin_mishra/32/32_2.png) [@vipin\_mishra](https://openvidu.discourse.group/u/vipin_mishra)\
**Post date:** [January 12, 2021, 11:46am UTC](https://openvidu.discourse.group/t/deploy-recording-using-docker/2534/9 "2021-01-12T11:46:47Z")

</div>

Yes you need accept the ssl certificate if you are not using domain

---

<div class="post-metadata">

**Author:** ![rakshithsm](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/rakshithsm/32/1250_2.png) [@rakshithsm](https://openvidu.discourse.group/u/rakshithsm)\
**Post date:** [January 12, 2021, 11:16pm UTC](https://openvidu.discourse.group/t/deploy-recording-using-docker/2534/10 "2021-01-12T23:16:19Z")

</div>

Yes, I did accept the certificate when my browser threw a warning about security. But, I am still facing this issue.

---

<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:** [January 13, 2021, 2:58pm UTC](https://openvidu.discourse.group/t/deploy-recording-using-docker/2534/11 "2021-01-13T14:58:24Z")

</div>

Try using:

```auto
var OPENVIDU_URL = "http://ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com";

```

instead of:

```auto
var OPENVIDU_URL = "http://ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com:5443";

```

OpenVidu is configured in port 443 externally by default.

Regards

---

<div class="post-metadata">

**Author:** ![vipin\_mishra](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/vipin_mishra/32/32_2.png) [@vipin\_mishra](https://openvidu.discourse.group/u/vipin_mishra)\
**Post date:** [January 13, 2021, 6:49pm UTC](https://openvidu.discourse.group/t/deploy-recording-using-docker/2534/12 "2021-01-13T18:49:32Z")

</div>

Yes @cruizba Is correct why you are using port 5443
