mirror of
https://github.com/MichaByte/OnBoard-Live.git
synced 2026-01-29 05:32:11 -05:00
setup for docker instead of podman
This commit is contained in:
parent
7c9c534fb9
commit
7457ecd6f9
4 changed files with 23 additions and 34 deletions
|
|
@ -1,12 +1,12 @@
|
|||
live.onboard.hackclub.com {
|
||||
reverse_proxy host.containers.internal:8889
|
||||
reverse_proxy mediamtx:8888
|
||||
handle /slack/* {
|
||||
reverse_proxy host.containers.internal:8000
|
||||
reverse_proxy backend:8000
|
||||
}
|
||||
handle /api/v1/github/* {
|
||||
reverse_proxy host.containers.internal:8000
|
||||
reverse_proxy backend:8000
|
||||
}
|
||||
handle /auth/* {
|
||||
reverse_proxy host.containers.internal:8000
|
||||
reverse_proxy backend:8000
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +1,12 @@
|
|||
services:
|
||||
mediamtx:
|
||||
restart: unless-stopped
|
||||
network_mode: "host"
|
||||
build:
|
||||
context: ./mediamtx
|
||||
dockerfile: Dockerfile
|
||||
volumes:
|
||||
- mediamtx_recordings:/recordings
|
||||
# ports:
|
||||
# - "8889:8889"
|
||||
# - "1935:1935"
|
||||
# - "9997:9997"
|
||||
web-frontend:
|
||||
ports:
|
||||
- "4173:4173"
|
||||
build:
|
||||
context: ./tiling-frontend
|
||||
dockerfile: Dockerfile
|
||||
|
|
@ -24,10 +17,7 @@ services:
|
|||
resources:
|
||||
limits:
|
||||
memory: 8192M
|
||||
reservations:
|
||||
memory: 8192M
|
||||
network_mode: "host"
|
||||
shm_size: '8gb'
|
||||
shm_size: '6gb'
|
||||
restart: unless-stopped
|
||||
env_file: .stream.env
|
||||
depends_on:
|
||||
|
|
@ -41,7 +31,6 @@ services:
|
|||
volumes:
|
||||
- tiling_frontend_build:/html
|
||||
backend:
|
||||
network_mode: "host"
|
||||
restart: unless-stopped
|
||||
env_file: .backend.env
|
||||
build:
|
||||
|
|
@ -50,19 +39,19 @@ services:
|
|||
volumes:
|
||||
- ./backend/db:/usr/src/app/db
|
||||
- mediamtx_recordings:/recordings
|
||||
caddy:
|
||||
image: docker.io/caddy:alpine
|
||||
restart: unless-stopped
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
- "443:443/udp"
|
||||
volumes:
|
||||
- $PWD/caddy/Caddyfile:/etc/caddy/Caddyfile
|
||||
- caddy_data:/data
|
||||
- caddy_config:/config
|
||||
# caddy:
|
||||
# image: docker.io/caddy:alpine
|
||||
# restart: unless-stopped
|
||||
# cap_add:
|
||||
# - NET_ADMIN
|
||||
# ports:
|
||||
# - "80:80"
|
||||
# - "443:443"
|
||||
# - "443:443/udp"
|
||||
# volumes:
|
||||
# - $PWD/caddy/Caddyfile:/etc/caddy/Caddyfile
|
||||
# - caddy_data:/data
|
||||
# - caddy_config:/config
|
||||
volumes:
|
||||
mediamtx_recordings:
|
||||
tiling_frontend_build:
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ bash -c "DISPLAY=:99 xvfb-run \
|
|||
--window-position=0,0 \
|
||||
--hide-scrollbars \
|
||||
--autoplay-policy=no-user-gesture-required \
|
||||
--app=http://localhost:4173" & disown
|
||||
--app=http://tiling-frontend:4173" & disown
|
||||
|
||||
sleep 3
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
const fetchData = async () => {
|
||||
try {
|
||||
const activeStreamResponse = await fetch(
|
||||
"http://localhost:8000/api/v1/active_stream",
|
||||
"http://backend:8000/api/v1/active_stream",
|
||||
);
|
||||
activeStream = (await activeStreamResponse.text()).replaceAll('"', "");
|
||||
// if (oldActiveStream !== null && oldActiveStream !== activeStream) {
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
// }
|
||||
oldActiveStream = activeStream;
|
||||
const pathListResponse = await (
|
||||
await fetch("http://localhost:9997/v3/paths/list")
|
||||
await fetch("http://mediamtx:9997/v3/paths/list")
|
||||
).json();
|
||||
console.log(pathListResponse);
|
||||
newData = [];
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
for (const video in videos) {
|
||||
const hlsInstance = new hls({ backBufferLength: 2 });
|
||||
hlsInstance.loadSource(
|
||||
`http://localhost:8888/${video}/index.m3u8`,
|
||||
`http://mediamtx:8888/${video}/index.m3u8`,
|
||||
);
|
||||
hlsInstance.attachMedia(videos[video]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue