Hello, could anyone help me with deployment on EC2 with node? and I can play the default openvidu version, but I want to deploy my own application. Then I uploaded my application fold to the location /opt/, so what is next?
EC2 with Node? What do you mean exactly? If your in AWS you can easily deploy OpenVidu with cloudformation following this guide: https://docs.openvidu.io/en/2.14.0/deployment/deploying-aws/
If I understand correctly, you have a Node App using OpenVidu Server. You can follow this guide to deploy your own apps
https://docs.openvidu.io/en/2.14.0/deployment/deploying-openvidu-apps/
TL:DR: You just need to deploy your application at port 5443 and specify your url of OpenVidu in your app to https://YOUR_OPENVIDU_DOMAIN_OR_PUBLIC_IP
Thanks for your help? Then I got this " ERROR: Couldn’t connect to Docker daemon at http+docker://localhost - is it running?
If it’s at a non-standard location, specify the URL with the DOCKER_HOST environment variable."
So how to fix this?
Hi, joylin, did you run docker-compose as root
?. AMIs used in our Cloudformation template has docker and docker-compose installed.
Hey Cruizba,
I did run docker as root not docker-compose. so I need install docker-compose too?
Thanks!
Joy Lin
What guide are you following to install OpenVidu? If you’ve deployed with CloudFormation, docker-compose is actually installed in the system.
Did you follow this guide before?: https://docs.openvidu.io/en/2.14.0/deployment/deploying-aws/
Yes, and I added my application to /opt/my application, so how to run this.
I uploaded openvidu-call files to /opt/openvidu-call, so I want to run this.
Is your application dockerized? If not, you need to run a http server serving your app at port 5442 via http. That’s the only thing you need. https://docs.openvidu.io/en/2.14.0/deployment/deploying-openvidu-apps/#installed-natively
If you’re application is dockerized, you need to modify the file at /opt/openvidu/docker-compose.override.yml
and adapt it to your own application.
Regards,
Carlos
I think my application is dockerized. It works locally. So how to modify the file at /opt/openvidu/docker-compose.override.yml?
What do you mean by “I think is dockerized”.
If your app is dockerized you should have a docker image, and your app should have some environment variables to work. I suposse that your app works locally with something like…
docker run -e ENV_VAR1 -e ENV_VAR2 ... <my-app-image>
You need to edit the /opt/openvidu/docker-compose.override.yml
in this way:
version: '3.1'
services:
app:
image: <my-app-image> # <---- Put here your app image
restart: on-failure
network_mode: host
environment:
# Maybe the env variables of your docker image are different....
- SERVER_PORT=5442 # <---- This is the port used by your app. You should have this defined as env variable.
- OPENVIDU_URL=http://localhost:5443 # <--- This is the url to make requests to openvidu-server
- OPENVIDU_SECRET=${OPENVIDU_SECRET} # <---- Your app will need this secret to make http petitions.
# Other env variables that your app have
With the information you give me I can’t help you more than this. Also, all of this is explained here: https://docs.openvidu.io/en/2.14.0/deployment/deploying-openvidu-apps/#with-docker
Yes, I don’t have a docker image , So I followed
https://docs.openvidu.io/en/2.14.0/demos/openvidu-call/#docker-image
but I’m not able to build an image. so I tried
https://docs.openvidu.io/en/2.14.0/deployment/deploying-openvidu-apps/#installed-natively
I am still not sure that’s how to work? Which method is easy to deploy on AWS EC2.
There is no “best” method. You should use the method you prefer.
Please see below, I followed your instruction, then I got error:
docker build -f /Users/joylin/Desktop/openvidu-call/docker/prod.dockerfile -t test --build-arg BRANCH_NAME=master --build-arg BASE_HREF=/
“docker build” requires exactly 1 argument.
See ‘docker build --help’.
Usage: docker build [OPTIONS] PATH | URL | -
Build an image from a Dockerfile
So how can I fix this ?
Please, copy the command exaclty how the docs says:
If you don’t have knowledge of docker I recommend you see its documentation.