mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 10:24:02 +00:00
Vite's dev server is the whole app here — it serves the client and runs every API proxy as middleware — so one container running `npm run dev` covers it, and HOST/PORT are already env-driven. Three details are deliberate: - The port publishes to 127.0.0.1. Docker's usual "4173:4173" binds every host interface, which would silently make the README's LAN warning the default for a server that brokers configured provider keys. - The repo is bind-mounted, so keys saved from Provider Settings, .gev-cache and .gev-logs persist on the host exactly as they do under `npm run dev`. node_modules stays in the image so a host install cannot shadow the Linux-built native deps. - The container runs as the host user, since everything it writes lands in that bind mount. Vite's dep optimizer still needs to write inside the image's node_modules, hence the two loosened directories. Puppeteer's Chromium download is skipped: it is only needed by `npm run test:track`, which the README points at the host. Co-Authored-By: Claude Opus 5 <[email protected]>
22 lines
1.0 KiB
YAML
22 lines
1.0 KiB
YAML
services:
|
|
gods-eye-view:
|
|
build: .
|
|
# Everything the app writes (.env with your keys, .gev-cache, .gev-logs)
|
|
# lands in the bind-mounted repo, so run as you, not root. UID/GID are
|
|
# unset on Docker Desktop, where the 1000 fallback is ignored anyway.
|
|
user: "${UID:-1000}:${GID:-1000}"
|
|
ports:
|
|
# Publish to loopback only. Docker's default ("4173:4173") would bind
|
|
# every host interface, which quietly turns the LAN warning in the README
|
|
# into the default: this server brokers whatever provider keys you have
|
|
# configured to anyone who can reach it. Widen this deliberately, not by
|
|
# accident.
|
|
- "127.0.0.1:4173:4173"
|
|
volumes:
|
|
# Bind the source so edits hot-reload and so keys pasted into the setup
|
|
# UI land in the .env on your host instead of vanishing with the
|
|
# container. node_modules stays in the image: sharp and friends are
|
|
# compiled for Linux and must not be shadowed by a host install.
|
|
- .:/app
|
|
- /app/node_modules
|