- Root docker-compose.yml: backend (python:3.11-slim) + frontend (multi-stage node build -> nginx:alpine) on the newzy-network bridge network, frontend waits for the backend health check - Persistent SQLite via bind mount ./data/db -> /app/data/db - .env / .env.example documenting DATABASE_URL, DEBUG, BACKEND_CORS_ORIGINS and FRONTEND_API_URL - Makefile: dev, stop, restart, build, logs, status, backend-start, frontend-start, test, e2e, shell-backend, shell-frontend, clean - data/.gitignore keeps the data/ structure in git while excluding the database; root .gitignore drops the overly broad data/ rule and adds docker-compose.override.yml - backend: .gitignore covers .env.*, Dockerfile sets unbuffered python and pre-creates the db volume dir; frontend: new .dockerignore - README: full Docker setup docs (prerequisites, quick start, services, ports, network/storage, env vars, Makefile reference, troubleshooting)
32 lines
1.5 KiB
Bash
32 lines
1.5 KiB
Bash
# newzy — environment variable template.
|
|
#
|
|
# Copy to `.env` and adjust as needed:
|
|
#
|
|
# cp .env.example .env
|
|
#
|
|
# `docker compose` in this directory reads `.env` automatically. `.env` is
|
|
# excluded from version control (see .gitignore) — never commit secrets.
|
|
# The backend's own defaults are documented in `backend/.env.example`.
|
|
|
|
# --- Database -------------------------------------------------------------
|
|
# SQLite database location (SQLAlchemy URL, relative to the backend's
|
|
# working directory). Inside the Docker image this resolves to
|
|
# /app/data/db/newzy.db, which is bind-mounted to ./data/db on the host.
|
|
DATABASE_URL=sqlite:///./data/db/newzy.db
|
|
|
|
# --- Backend ----------------------------------------------------------------
|
|
# Enable debug mode (verbose logs; keep off in production).
|
|
DEBUG=false
|
|
# Comma-separated list of origins the backend allows for CORS. The Docker
|
|
# frontend proxies /api (same-origin, no CORS needed); this mainly matters
|
|
# when developing the frontend directly on http://localhost:5173.
|
|
BACKEND_CORS_ORIGINS=http://localhost:3000,http://localhost:5173
|
|
|
|
# --- Frontend ----------------------------------------------------------------
|
|
# Base URL the frontend uses to reach the backend API.
|
|
# /api -> relative (recommended: the Vite dev server and the
|
|
# Docker Nginx config both proxy /api to the backend)
|
|
# http://host:port -> absolute (cross-origin; the origin must be listed in
|
|
# BACKEND_CORS_ORIGINS)
|
|
FRONTEND_API_URL=/api
|