Initial commit

Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
Tuan-Dat Tran
2024-12-31 13:36:22 +01:00
commit 931652c494
78 changed files with 46976 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
from flask import Flask, request
import sys
app = Flask(__name__)
@app.route('/upload', methods=['POST'])
def handle_post_request():
# Print the received POST request data
print(request)
print(request.data)
# Respond with a 200 status code
return '', 200
if __name__ == '__main__':
app.run(host='0.0.0.0', port=int(sys.argv[1]))

View File

@@ -0,0 +1,24 @@
version: "3.9"
name: uulm_network_monitoring
services:
videoprobe:
build:
context: ../
dockerfile: Dockerfile
container_name: netmon_receiver_videoprobe
deploy:
resources:
limits:
cpus : "1.0"
memory: 512M
healthcheck:
test: curl http://localhost:8000
interval: 10s
environment:
- RUST_LOG=info
- ROCKET_CONFIG=/etc/videoprobe/Rocket.toml
- GNSS_DEV=/dev/ttyACM0
ports:
- 8000:8000
devices:
- /dev/ttyACM0:/dev/ttyACM0

View File

@@ -0,0 +1,38 @@
version: "3.9"
name: uulm_network_monitoring
services:
web:
build:
context: .
dockerfile: nginx.Dockerfile
container_name: netmon_sender_web
deploy:
resources:
limits:
cpus : "1.0"
memory: 512M
healthcheck:
test: curl http://localhost:1935
interval: 10s
ports:
- 1935:1935
sender:
build:
context: .
dockerfile: ffmpeg.Dockerfile
container_name: netmon_sender_ffmpeg
deploy:
resources:
limits:
cpus : "1.0"
memory: 2048M
healthcheck:
test: curl http://web:1935
interval: 10s
environment:
- CMD=/usr/local/bin/ffmpeg -f lavfi -i testsrc -vf scale=3840x2160 -r 60 -c:v libx264 -pix_fmt yuv420p -b:v 40M -f flv rtmp://web/live/test
depends_on:
- web
devices:
- /dev/dri:/dev/dri