Skip to content

Commit e8d8c48

Browse files
author
Grok
committed
[Grok] Sanitize repo for public release (1.1.4)
Remove homelab-specific paths and private-GHCR instructions. Generic compose defaults; UTC timezone; public README. Co-authored-by: Grok <grok@x.ai>
1 parent 0b00133 commit e8d8c48

7 files changed

Lines changed: 81 additions & 43 deletions

File tree

.env.example

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
PUID=1000
2+
PGID=1000
3+
TZ=UTC
4+
TESLACAM_MEDIA_PATH=/path/to/TeslaUSB
5+
TESLACAM_AUTH_USER=
6+
TESLACAM_AUTH_PASS=
7+
TESLACAM_PORT=8000

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ RUN chmod +x /docker-entrypoint.sh \
2323

2424
ENV MEDIA_PATH=/media \
2525
CACHE_PATH=/cache \
26-
TZ=America/Toronto \
26+
TZ=UTC \
2727
PORT=8000 \
2828
PUID=568 \
2929
PGID=568

README.md

Lines changed: 63 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,63 @@
11
# TeslaCam Viewer
22

3-
Lightweight, self-hosted Docker web application for browsing and playing TeslaUSB / TeslaCam archived clips.
3+
Lightweight, self-hosted web app for browsing TeslaUSB / TeslaCam archives.
44

5-
Designed for **TrueNAS Scale + Portainer** and older hardware (Haswell-friendly).
5+
Play Saved, Sentry, and Recent clips with synchronized multi-camera playback. Runs in Docker, including on older NAS/homelab hardware.
66

7-
**Image:** `ghcr.io/adsouza98/teslacam-viewer:1.1.1`
8-
9-
Version is defined in `VERSION`. Pushing to `main` publishes that tag (and `latest`) to GHCR. Bump `VERSION` for a new release so Portainer/Renovate can pick it up.
7+
**Image:** [`ghcr.io/adsouza98/teslacam-viewer:1.1.4`](https://github.com/Adsouza98/teslacam-viewer/pkgs/container/teslacam-viewer)
108

119
## Features
1210

13-
- Clean dark-theme UI, tuned for phones and foldables (Galaxy Z Fold folded + unfolded)
11+
- Dark-theme UI that works on desktop, phones, and foldables
1412
- Browse **Saved**, **Sentry**, and **Recent** clips
1513
- Filter by date range
1614
- Multi-camera synchronized playback (front / back / left / right / pillars)
17-
- Fullscreen a single camera (button, **Fullscreen** in the player bar, or double-tap). Phones use a viewport overlay because native Fullscreen on a tile often does nothing on Android/Samsung.
18-
- Uses existing `thumb.png` when available, otherwise generates a thumbnail
15+
- Per-camera fullscreen (button, player bar, or double-tap)
16+
- Uses `thumb.png` when present, otherwise generates a thumbnail
1917
- Optional HTTP Basic Authentication
2018
- Read-only media mount
21-
- Runs as TrueNAS apps user (`PUID`/`PGID` 568 by default)
2219

23-
## Image (GHCR)
20+
## Quick start
2421

22+
```bash
23+
docker run -d --name teslacam-viewer \
24+
-p 8000:8000 \
25+
-e TZ=UTC \
26+
-v /path/to/TeslaUSB:/media:ro \
27+
ghcr.io/adsouza98/teslacam-viewer:1.1.4
2528
```
26-
ghcr.io/adsouza98/teslacam-viewer:1.1.1
29+
30+
Or with Compose:
31+
32+
```yaml
33+
services:
34+
teslacam-viewer:
35+
image: ghcr.io/adsouza98/teslacam-viewer:1.1.4
36+
container_name: teslacam-viewer
37+
environment:
38+
PUID: "1000"
39+
PGID: "1000"
40+
TZ: UTC
41+
AUTH_USER: "" # optional
42+
AUTH_PASS: "" # optional
43+
volumes:
44+
- /path/to/TeslaUSB:/media:ro
45+
- teslacam-cache:/cache
46+
ports:
47+
- "8000:8000"
48+
restart: unless-stopped
49+
50+
volumes:
51+
teslacam-cache:
2752
```
2853
29-
Because this repository is **private**, Portainer needs a GitHub PAT (`read:packages`) registered as a Docker registry:
54+
Then open `http://localhost:8000`.
3055

31-
- Registry URL: `https://ghcr.io`
32-
- Username: your GitHub username
33-
- Password: PAT with `read:packages`
56+
The GHCR image is public — no GitHub login is required to pull it.
3457

35-
You do **not** clone this repo onto TrueNAS. Pin the version in `homelab-stacks` and let Portainer poll git / Renovate bump the tag.
58+
## Expected folder layout
3659

37-
## Folder Structure Expected
60+
Mount the TeslaUSB archive at `/media` (read-only). Either of these works:
3861

3962
```
4063
/media/
@@ -50,30 +73,41 @@ You do **not** clone this repo onto TrueNAS. Pin the version in `homelab-stacks`
5073
└── RecentClips/
5174
```
5275

53-
Also works if the clips live under `/media/TeslaCam/...`.
76+
```
77+
/media/TeslaCam/SavedClips/...
78+
```
5479
55-
## Portainer environment variables
80+
## Environment variables
5681
5782
| Variable | Default | Description |
5883
|----------|---------|-------------|
59-
| `PUID` | `568` | Process user ID (TrueNAS apps) |
60-
| `PGID` | `568` | Process group ID |
61-
| `TZ` | `America/Toronto` | Timezone |
62-
| `TESLACAM_MEDIA_PATH` | `/mnt/Starlink/Tesla/TeslaUSB` | Host path to TeslaUSB dataset |
63-
| `TESLACAM_AUTH_USER` | (empty) | Optional basic auth username |
64-
| `TESLACAM_AUTH_PASS` | (empty) | Optional basic auth password |
65-
| `TESLACAM_PORT` | `8000` | Host port |
84+
| `PUID` | `568` | UID the process runs as |
85+
| `PGID` | `568` | GID the process runs as |
86+
| `TZ` | `UTC` | Container timezone |
87+
| `AUTH_USER` | (empty) | Optional basic-auth username |
88+
| `AUTH_PASS` | (empty) | Optional basic-auth password |
89+
| `MEDIA_PATH` | `/media` | Media path **inside** the container |
90+
| `CACHE_PATH` | `/cache` | Thumbnail cache path inside the container |
6691
67-
Leave auth empty to disable login.
92+
Leave `AUTH_USER` / `AUTH_PASS` empty to disable login. On TrueNAS SCALE the apps user is typically `568:568`.
6893
6994
## Keyboard / touch
7095
7196
- `Space` – Play / Pause all cameras
7297
- `←` / `→` – Seek ±5 seconds
7398
- `M` – Mute / Unmute
7499
- `Esc` – Exit camera fullscreen
75-
- Camera **Full** button, player **Fullscreen**, or **double-tap** a video – fullscreen that angle
100+
- Camera fullscreen button, player **Full**, or **double-tap** a video – fullscreen that angle
101+
102+
## Build from source
103+
104+
```bash
105+
docker build -t teslacam-viewer .
106+
docker run --rm -p 8000:8000 -v /path/to/TeslaUSB:/media:ro teslacam-viewer
107+
```
108+
109+
Pushing to `main` publishes `VERSION` and `latest` to GHCR.
76110

77111
## License
78112

79-
MIT – free to use and modify.
113+
MIT

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.3
1+
1.1.4

app/main.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
"""
2-
TeslaCam Viewer - Lightweight FastAPI backend for TeslaUSB archived clips.
3-
Designed for TrueNAS / older hardware (Haswell-friendly).
4-
"""
1+
"""TeslaCam Viewer - FastAPI backend for TeslaUSB / TeslaCam archives."""
52

63
from __future__ import annotations
74

@@ -33,7 +30,7 @@ class Settings(BaseSettings):
3330
auth_user: Optional[str] = None
3431
auth_pass: Optional[str] = None
3532
cache_path: str = "/cache"
36-
timezone: str = "America/Toronto"
33+
timezone: str = "UTC"
3734

3835
class Config:
3936
env_file = ".env"

app/static/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<meta name="apple-mobile-web-app-capable" content="yes" />
99
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
1010
<title>TeslaCam Viewer</title>
11-
<link rel="stylesheet" href="/static/css/style.css?v=1.1.3" />
11+
<link rel="stylesheet" href="/static/css/style.css?v=1.1.4" />
1212
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>&#x1F697;</text></svg>">
1313
</head>
1414
<body>
@@ -101,6 +101,6 @@ <h2>Select an event</h2>
101101
</div>
102102
</div>
103103

104-
<script src="/static/js/app.js?v=1.1.3"></script>
104+
<script src="/static/js/app.js?v=1.1.4"></script>
105105
</body>
106106
</html>

docker-compose.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
services:
22
teslacam-viewer:
33
build: .
4-
image: ghcr.io/adsouza98/teslacam-viewer:1.1.3
4+
image: ghcr.io/adsouza98/teslacam-viewer:1.1.4
55
container_name: teslacam-viewer
66
environment:
7-
- PUID=${PUID:-568}
8-
- PGID=${PGID:-568}
9-
- TZ=${TZ:-America/Toronto}
7+
- PUID=${PUID:-1000}
8+
- PGID=${PGID:-1000}
9+
- TZ=${TZ:-UTC}
1010
- AUTH_USER=${TESLACAM_AUTH_USER:-}
1111
- AUTH_PASS=${TESLACAM_AUTH_PASS:-}
1212
volumes:
13-
- ${TESLACAM_MEDIA_PATH:-/mnt/Starlink/Tesla/TeslaUSB}:/media:ro
13+
- ${TESLACAM_MEDIA_PATH:-./media}:/media:ro
1414
- teslacam-cache:/cache
1515
ports:
1616
- "${TESLACAM_PORT:-8000}:8000"

0 commit comments

Comments
 (0)