Skip to content

Commit c537f17

Browse files
committed
Merge remote-tracking branch 'compositions/monorepo-prep' into monorepo-prep
2 parents 3fac35a + 53a8876 commit c537f17

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+9030
-0
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,10 @@ daemons/*/dist
1111
.env
1212
daemons/staticserver/oss-attribution/*
1313
tsconfig.tsbuildinfo
14+
.env-file
15+
*.pem
16+
*.key
17+
*.crt
18+
deploy/docker-compose/.env
19+
deploy/helmchart/configexamples
1420

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#cloud-config
2+
write_files:
3+
- content: |
4+
# configure your avs server instance
5+
# first nameofyourcluster|secret|URL of the dispatcher
6+
AVSCONFIG=yourclustername|sharedsecretwithdispatcher|https://urlofyourfailsinstallation/avs
7+
# the domain name or better hostname of your router
8+
AVSDOMAIN=hostnameofyourrouter.example.com
9+
# optionally you can set the timezone, defaults to Europe/Berlin, required to find a restart time in the night
10+
# AVSTIMEZONE=
11+
#turns of staging, comment if you would like to use cert-bot staging environment
12+
STAGING=
13+
path: /home/linux/.env
14+
15+
repo_update: true
16+
repo_upgrade: all
17+
18+
packages:
19+
- apt-transport-https
20+
- ca-certificates
21+
- curl
22+
- gnupg-agent
23+
- software-properties-common
24+
25+
runcmd:
26+
- apt-get update -y && apt-get install software-properties-common -y && apt-get update -y
27+
- curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
28+
- add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
29+
- apt-get update -y && apt-get install docker-ce docker-ce-cli docker-compose-plugin -y
30+
- wget -O /home/linux/docker-compose.yml https://github.com/fails-components/compositions/raw/master/avsrouter/docker-compose.yml
31+
- cd /home/linux/ && docker compose pull && docker compose up -d
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
version: "3.9"
2+
volumes:
3+
acmeroot:
4+
5+
certdir:
6+
7+
certbotdata:
8+
9+
avsconfigdir:
10+
11+
services:
12+
avsrouter:
13+
image: "ghcr.io/fails-components/avsrouter:${FAILS_TAG:-master}"
14+
volumes:
15+
- acmeroot:/usr/src/avsrouter/challenges:ro
16+
- certdir:/usr/src/avsrouter/certs:ro
17+
- avsconfigdir:/usr/src/avsrouter/config:rw
18+
restart: always
19+
ports:
20+
- "443:443"
21+
- "443:443/udp"
22+
- "80:80"
23+
healthcheck:
24+
test: curl --fail http://localhost/health || exit 1
25+
interval: 60s
26+
retries: 5
27+
start_period: 20s
28+
timeout: 10s
29+
30+
environment:
31+
# region config, needs to be set externally, aswell as AVSDOMAIN
32+
- AVSCONFIG
33+
- AVSROUTERURL=https://${AVSDOMAIN}/avfails
34+
- AVSROUTERWSURL=wss://${AVSDOMAIN}/avfails
35+
- AVSMAXCLIENTS=${AVSMAXCLIENTS:-50}
36+
- AVSMAXREALMS=${AVSMAXREALMS:-10}
37+
- AVSROUTERHOST=0.0.0.0
38+
- AVSROUTERPORT=443
39+
# filename for key and cert fopr http1, checked all 5 sec for changes
40+
- AVSROUTERKEYPEM=/usr/src/avsrouter/certs/live/${AVSDOMAIN}/privkey.pem
41+
- AVSROUTERCERTPEM=/usr/src/avsrouter/certs/live/${AVSDOMAIN}/fullchain.pem
42+
# dirname for serving acme challenges
43+
- AVSROUTERACMEHTTP1DIR=/usr/src/avsrouter/challenges
44+
# time zones to find suitable restart times for certificate rotations defaults to Europe/Berlin
45+
- AVSTIMEZONE
46+
certbot:
47+
image: certbot/certbot
48+
depends_on:
49+
avsrouter:
50+
condition: service_healthy
51+
restart: always
52+
volumes:
53+
- certbotdata:/var/lib/letsencrypt:rw
54+
- certdir:/etc/letsencrypt:rw
55+
- acmeroot:/var/www/html:rw
56+
entrypoint: /bin/sh -c 'trap exit TERM;
57+
if [ ! -f /etc/letsencrypt/certs/live/${AVSDOMAIN}/privkey.pem ];
58+
then
59+
echo "Obtain initial certificate!";
60+
certbot certonly --webroot -w /var/www/html -d ${AVSDOMAIN} --non-interactive --agree-tos
61+
--register-unsafely-without-email ${STAGING---staging};
62+
fi;
63+
while :;
64+
do
65+
echo "Check certificate renewal";
66+
certbot renew;
67+
echo "Sleep for 12 h";
68+
sleep 12h & wait $${!};
69+
done;'
70+
71+
72+

deploy/avsrouter/readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Experimental files using docker compose to spin up audio-video-screen routers.
2+
This is not ready yet, do not use it.

0 commit comments

Comments
 (0)