- Left panel: collapsible tree (Country → City → District → Category → Subcategory) - Quick-add buttons: + City, + District, + Category, + Subcategory - Delete buttons with confirmation on all nodes - Product count badges on each node - Click node to filter right panel - Right panel: Product table with Photo, Name, Category, Subcategory, Price, Stock - Edit (✎) and Delete (✕) buttons per row - Add Product modal with all fields - Product edit form: name, price, stock, description, category, subcategory (JS filtered), photo_url/hidden_photo_url (URL or file upload), hidden_coordinates, hidden_description, private_data - Multer file upload for photos stored in /uploads/ - Routes: add-city, add-district, product CRUD with photo upload - Product JSON API for modal editing - Responsive grid: tree (320px) + table (1fr)
36 lines
1.0 KiB
YAML
36 lines
1.0 KiB
YAML
version: "3.3"
|
|
services:
|
|
telegram_shop_prod:
|
|
build:
|
|
context: .
|
|
dockerfile: ./Dockerfile
|
|
network: host
|
|
hostname: telegram_shop_prod
|
|
container_name: telegram_shop_prod
|
|
ports:
|
|
- "3001:3001"
|
|
restart: always
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
- ./db:/app/db/ # Синхронизация базы данных (persistence)
|
|
- ./uploads:/app/uploads/ # Uploaded product photos
|
|
- ./wg/start.sh:/app/start.sh # Монтируем start.sh (генерирует wg0.conf из env)
|
|
cap_add: # Минимальные привилегии, необходимые только для WireGuard
|
|
- NET_ADMIN
|
|
sysctls:
|
|
- net.ipv4.conf.all.src_valid_mark=1 # Необходимо для маршрутизации
|
|
dns:
|
|
- 8.8.8.8
|
|
- 1.1.1.1
|
|
mem_limit: 512m
|
|
cpus: "1.0"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-sf", "http://localhost:3001/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 60s
|
|
networks:
|
|
default:
|