meet-demo: add deployment configuration with Docker and Caddy

- Create README.md for deployment instructions
- Add .env file for environment variables
- Add Caddyfile for reverse proxy configuration
- Create docker-compose.yml for service orchestration
This commit is contained in:
juancarmore 2025-10-21 10:38:38 +02:00
parent 1b152d7ab7
commit ad191eba29
6 changed files with 91 additions and 23 deletions

View File

@ -3,7 +3,7 @@
## Prerequisites ## Prerequisites
- [Node](https://nodejs.org/en/download) (for local development) - [Node](https://nodejs.org/en/download) (for local development)
- [Docker](https://docs.docker.com/get-docker/) (for containerized deployment) - [Docker](https://docs.docker.com/get-docker/) and Docker Compose (for containerized deployment)
## Run Locally ## Run Locally
@ -31,28 +31,9 @@ npm start
4. Access the application at `http://localhost:6080` 4. Access the application at `http://localhost:6080`
## Run with Docker ## Deploy with Docker
### Using Docker CLI For production deployment with Docker and HTTPS support via Caddy, see the [deployment directory](./deployment/README.md).
1. Build the Docker image
```bash
docker build -t openvidu/openvidu-meet-demo .
```
2. Run the container
```bash
docker run -d \
--name meet-demo \
-p 6080:6080 \
-e OV_MEET_SERVER_URL=https://meet.openvidu.io \
-e OV_MEET_API_KEY=meet-api-key \
openvidu/openvidu-meet-demo
```
3. Access the application at `http://localhost:6080`
## Configuration ## Configuration

View File

@ -0,0 +1,8 @@
# OpenVidu Meet Demo Configuration
# Domain for the application (used by Caddy for HTTPS)
DOMAIN=meet-demo-app.openvidu.io
# OpenVidu Meet Server Configuration
OV_MEET_SERVER_URL=https://meet-demo.openvidu.io
OV_MEET_API_KEY=meet-api-key

View File

@ -0,0 +1,3 @@
{$DOMAIN:meet-demo-app.openvidu.io} {
reverse_proxy meet-demo:6080
}

View File

@ -0,0 +1,47 @@
# OpenVidu Meet Demo - Deployment Guide
This directory contains all the files needed to deploy the OpenVidu Meet Demo application using Docker and Caddy as a reverse proxy with automatic HTTPS.
## Structure
```
deployment/
├── docker-compose.yml # Docker Compose configuration
├── Dockerfile # Application Docker image
├── Caddyfile # Caddy reverse proxy configuration
├── .env # Environment variables
└── README.md # This file
```
## Quick Start
### Prerequisites
- Docker and Docker Compose installed
- Domain name pointing to your server (for HTTPS with Caddy)
- Ports 80 and 443 available on your server
### Steps
1. **Configure environment variables**: Edit the `.env` file to set your domain and OpenVidu Meet server details.
| Variable | Description | Default |
| -------------------- | ---------------------------------------- | ------------------------------- |
| `DOMAIN` | Domain name for HTTPS (Caddy) | `meet-demo-app.openvidu.io` |
| `OV_MEET_SERVER_URL` | URL of the OpenVidu Meet server | `https://meet-demo.openvidu.io` |
| `OV_MEET_API_KEY` | API key for OpenVidu Meet authentication | `meet-api-key` |
2. **Build the Docker image**: Build and push the Docker image to your registry if needed.
```bash
docker build -t openvidu/openvidu-meet-demo:{version} ..
docker push openvidu/openvidu-meet-demo:{version}
```
3. **Start the services**
```bash
docker-compose up -d
```
4. **Access the application**: Open your web browser and navigate to `https://meet-demo-app.openvidu.io` (or your configured domain).

View File

@ -0,0 +1,29 @@
services:
meet-demo:
image: openvidu/openvidu-meet-demo:3.4.1
container_name: meet-demo
environment:
- SERVER_PORT=6080
- OV_MEET_SERVER_URL=${OV_MEET_SERVER_URL:-https://meet-demo.openvidu.io}
- OV_MEET_API_KEY=${OV_MEET_API_KEY:-meet-api-key}
restart: unless-stopped
caddy:
image: caddy:2-alpine
container_name: caddy
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
- caddy_config:/config
environment:
- DOMAIN=${DOMAIN:-meet-demo-app.openvidu.io}
restart: unless-stopped
depends_on:
- meet-demo
volumes:
caddy_data:
caddy_config: