Skip to content

Commit 582e4c1

Browse files
committed
Add basic Dockerfile
1 parent 2e71684 commit 582e4c1

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM python:3.13
2+
3+
WORKDIR /app
4+
5+
COPY pyproject.toml vinx_mjpeg_server.py /app
6+
COPY vinx_mjpeg_server /app/vinx_mjpeg_server
7+
8+
RUN pip install --no-cache .
9+
10+
ENTRYPOINT ["python3", "/app/vinx_mjpeg_server.py"]
11+
12+
CMD ["-h"]

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,33 @@ there was an issue in fetching the preview image.
1515
This application uses our [pylw3](https://github.com/NitorCreations/pylw3) library under the hood to discover encoders
1616
and [aiohttp](https://github.com/aio-libs/aiohttp) for HTTP.
1717

18+
## Usage
19+
20+
The recommended way is to run the server using the supplied Dockerfile:
21+
22+
```bash
23+
$ docker build -t vinx-mjpeg-server:latest .
24+
$ docker run vinx-mjpeg-server:latest -h
25+
DEBUG:asyncio:Using selector: EpollSelector
26+
usage: vinx-mjpeg-server [-h] --bootstrap-node BOOTSTRAP_NODE
27+
[--fallback-image FALLBACK_IMAGE] [-l LISTEN_ADDRESS]
28+
[-p PORT]
29+
30+
Serves MJPEG streams from VINX HDMI encoder preview images
31+
32+
options:
33+
-h, --help show this help message and exit
34+
--bootstrap-node BOOTSTRAP_NODE
35+
A VINX encoder to use as bootstrap node for auto-
36+
discovery
37+
--fallback-image FALLBACK_IMAGE
38+
A JPEG image to use as fallback when the encoder
39+
preview is unavailable
40+
-l, --listen-address LISTEN_ADDRESS
41+
The address the HTTP server should listen on
42+
-p, --port PORT The port the HTTP should listen on
43+
```
44+
1845
## License
1946

2047
GNU GENERAL PUBLIC LICENSE version 3

0 commit comments

Comments
 (0)