Files
sproutly/docker-compose.yml
derekc 4db9988406 Add multi-user authentication with JWT
- Users table with email/bcrypt-hashed password; register and login via /auth/ endpoints
- JWT tokens (30-day expiry) stored in localStorage; all API routes require Bearer auth
- All data (varieties, batches, settings, notification logs) scoped to the authenticated user
- Login/register screen overlays the app; sidebar shows user email and logout button
- Scheduler sends daily ntfy summaries for every configured user
- DB schema rewritten for multi-user; SECRET_KEY added to env

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 00:08:28 -07:00

59 lines
1.2 KiB
YAML

version: '3.8'
services:
mysql:
image: mysql:8.0
container_name: sproutly_db
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: sproutly
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
volumes:
- mysql_data:/var/lib/mysql
- ./mysql/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- sproutly_net
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${MYSQL_ROOT_PASSWORD}"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
backend:
build: ./backend
container_name: sproutly_api
restart: unless-stopped
environment:
DB_HOST: mysql
DB_PORT: 3306
DB_NAME: sproutly
DB_USER: ${MYSQL_USER}
DB_PASSWORD: ${MYSQL_PASSWORD}
SECRET_KEY: ${SECRET_KEY}
depends_on:
mysql:
condition: service_healthy
networks:
- sproutly_net
nginx:
build: ./nginx
container_name: sproutly_web
restart: unless-stopped
ports:
- "8053:80"
depends_on:
- backend
networks:
- sproutly_net
networks:
sproutly_net:
driver: bridge
volumes:
mysql_data: