Files
livekit/deploy/cloud-init.ubuntu.yaml
Mathew Kamkar b0eca12ee8 Simple deployment to EC2 (#134)
* aws ami

* cloud-init from base ami

* rename

* readme and ubuntu cloud-init

* nginx ssl termination

* small readme fixes

* nginx on ubuntu cloud-init

* better default config, nginx websocket config

* small change to readme

* packer does not need to start services

* standardize nginx config

* path fixes

* small fixes

* end line return

* move readme to docs repo

* remove lk-image cloud-init and bake into ami
2021-10-05 10:47:55 -07:00

41 lines
1.1 KiB
YAML

#cloud-config
package_update: true
package_upgrade: all
packages:
- docker.io
- nginx
bootcmd:
- mkdir /opt/livekit-server/ssl
write_files:
- path: /opt/livekit-server/config.yaml
content: |
log_level: info
port: 7880
rtc:
use_external_ip: true
tcp_port: 7881
udp_port: 7882
keys:
APIkey: secret
- path: /opt/livekit-server/ssl/server.crt
content: |
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
- path: /opt/livekit-server/ssl/server.key
content: |
-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----
runcmd:
- export LIVEKIT_VERSION=v0.13 # set LiveKit version
- curl -o /etc/systemd/system/docker.livekit-server@.service -O https://raw.githubusercontent.com/livekit/livekit-server/master/deploy/docker.livekit-server%40.service
- systemctl enable docker.livekit-server@${LIVEKIT_VERSION}
- systemctl start docker.livekit-server@${LIVEKIT_VERSION}
- curl -o /etc/nginx/conf.d/livekit.conf -O https://raw.githubusercontent.com/livekit/livekit-server/master/deploy/livekit.nginx.conf
- systemctl restart nginx