SmartCart/docker-compose.yml
Richard Nixon 20f7c76cdf Migrate frontend from Streamlit to Next.js with shadcn/ui
Replace the Streamlit dashboard with a modern Next.js 15 frontend using
TypeScript, Tailwind CSS, shadcn/ui components, Recharts, and TanStack
Query. All four pages (Overview, Price Battle, Product History, Basket
Compare) are fully reimplemented with responsive layouts, collapsible
sidebar navigation, and proper data fetching with caching. Adds Docker
Compose setup for db + api + frontend and removes streamlit/plotly deps.
2026-02-11 18:12:19 +00:00

45 lines
1 KiB
YAML

services:
db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: smartcart
POSTGRES_PASSWORD: smartcart
POSTGRES_DB: smartcart
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U smartcart"]
interval: 5s
timeout: 5s
retries: 5
api:
build: .
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
DATABASE_URL: postgresql+asyncpg://smartcart:smartcart@db:5432/smartcart
DATABASE_URL_SYNC: postgresql://smartcart:smartcart@db:5432/smartcart
API_HOST: "0.0.0.0"
API_PORT: "8000"
ports:
- "8000:8000"
command: python -m uvicorn src.api.main:app --host 0.0.0.0 --port 8000
frontend:
build: ./frontend
restart: unless-stopped
depends_on:
- api
environment:
NEXT_PUBLIC_API_URL: http://api:8000
ports:
- "3000:3000"
volumes:
pgdata: