- compose.cloud.yml: snipe-cloud project, proper Docker bridge network (api is internal-only, no host port), port 8514 for nginx - docker/web/Dockerfile: VITE_BASE_URL + VITE_API_BASE build args so Vite bakes the /snipe path prefix into the bundle at cloud build time - docker/web/nginx.cloud.conf: upstream api:8510 via Docker network (vs 172.17.0.1:8510 in dev which uses host networking) - manage.sh: cloud-start/stop/restart/status/logs/build commands - stores/search.ts: VITE_API_BASE prefix on all /api fetch calls Gate: Caddy basicauth (username: cf) — temporary gate while proper Heimdall license validation UI is built. Password stored at /devl/snipe-cloud-data/.beta-password (host-only, not in repo). Note: Caddyfile updated separately (caddy-proxy volume, not this repo).
42 lines
1.4 KiB
YAML
42 lines
1.4 KiB
YAML
# Snipe — cloud managed instance
|
|
# Project: snipe-cloud (docker compose -f compose.cloud.yml -p snipe-cloud ...)
|
|
# Web: http://127.0.0.1:8514 → menagerie.circuitforge.tech/snipe (via Caddy basicauth)
|
|
# API: internal only on snipe-cloud-net (no host port — only reachable via nginx)
|
|
#
|
|
# Usage: ./manage.sh cloud-start | cloud-stop | cloud-restart | cloud-status | cloud-logs | cloud-build
|
|
|
|
services:
|
|
api:
|
|
build:
|
|
context: ..
|
|
dockerfile: snipe/Dockerfile
|
|
restart: unless-stopped
|
|
# No network_mode: host — isolated on snipe-cloud-net; nginx reaches it via 'api:8510'
|
|
volumes:
|
|
- /devl/snipe-cloud-data:/app/snipe/data
|
|
networks:
|
|
- snipe-cloud-net
|
|
|
|
web:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/web/Dockerfile
|
|
args:
|
|
# Vite bakes these at image build time — changing them requires cloud-build.
|
|
# VITE_BASE_URL: app served under /snipe → asset URLs become /snipe/assets/...
|
|
# VITE_API_BASE: prepended to all /api/* fetch calls → /snipe/api/search
|
|
VITE_BASE_URL: /snipe
|
|
VITE_API_BASE: /snipe
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8514:80" # Caddy (caddy-proxy container) reaches via host.docker.internal:8514
|
|
volumes:
|
|
- ./docker/web/nginx.cloud.conf:/etc/nginx/conf.d/default.conf:ro
|
|
networks:
|
|
- snipe-cloud-net
|
|
depends_on:
|
|
- api
|
|
|
|
networks:
|
|
snipe-cloud-net:
|
|
driver: bridge
|