zov-tech/deploy/docker-compose.yml
wasrusgen a084542bbf measurements: photo upload + measurement detail page + PDF/print
Wizard: new 'photos' step (6 total) — camera/gallery input, client-side
canvas compression to 1600px @ ~78% JPEG, max 12 photos. Thumbnails
with delete in step; preview in summary.

Backend: POST /api/measurement now decodes data-URL photos and saves
to /app/photos/<id>/N.jpg (volume-mounted). New GET /api/photo/{id}/{n}
serves files with path-traversal protection. New POST /api/measurement_detail
returns full measurement record (walls/openings/photos/notes/...).

Clients page: measurement rows now clickable → renderMeasurement detail
view with key-value grid + photo gallery + 'Скачать PDF / Печать'.
Print stylesheet (@media print) hides navigation/buttons/uploaders and
prints clean A4-friendly layout.

Podbor report: existing 'Печать → PDF' now falls back to inline
window.print() inside Telegram WebApp (popups are blocked there).

Cache bust v=20260513a.
2026-05-12 18:11:29 +03:00

61 lines
1.6 KiB
YAML

services:
backend:
build:
context: ../backend-py
dockerfile: Dockerfile
image: zov-tech-backend:latest
container_name: zov-backend
restart: unless-stopped
env_file:
- .env
volumes:
- ./credentials.json:/app/credentials.json:ro
- ./photos:/app/photos
networks:
- web # внешняя сеть от deploy-стека (Caddy там)
- internal
expose:
- "8000"
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request,sys; r=urllib.request.urlopen('http://127.0.0.1:8000/healthz', timeout=3); sys.exit(0 if r.status==200 else 1)"]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
bot:
build:
context: ../bot
dockerfile: Dockerfile
image: zov-tech-bot:latest
container_name: zov-bot
restart: unless-stopped
env_file:
- .env
networks:
- internal
depends_on:
backend:
condition: service_healthy
# Cloudflare Quick Tunnel — публичный HTTPS-URL без своего домена.
# Используется временно пока wasrusgen1.pro в verification-hold.
tunnel:
image: cloudflare/cloudflared:latest
container_name: zov-tunnel
restart: unless-stopped
command: tunnel --no-autoupdate --url http://backend:8000
depends_on:
backend:
condition: service_healthy
networks:
- internal
networks:
# Использует уже существующую сеть от furniture-deploy stack — там Caddy
web:
name: deploy_web
external: true
internal:
driver: bridge