# ============================================ # Docker Compose Environment Variables # ============================================ # Used by docker-compose.yml for PostgreSQL service POSTGRES_USER=postgres POSTGRES_PASSWORD=postgres POSTGRES_DB=books POSTGRES_PORT=5432 # ============================================ # Backend Environment Variables # ============================================ # Copy these to backend/.env # Database connection string DATABASE_URL="postgresql://postgres:postgres@localhost:5432/books" # API server configuration API_PORT=3000 NODE_ENV=development # External services OPEN_LIBRARY_API_URL=https://openlibrary.org # CORS configuration CORS_ORIGIN=http://localhost:5173 # Logging LOG_LEVEL=info # ============================================ # Frontend Environment Variables # ============================================ # Copy these to frontend/.env.local # Backend API URL VITE_API_URL=http://localhost:3000/api # ============================================ # Notes # ============================================ # 1. Copy this file to .env in the root directory for Docker Compose # 2. Copy backend variables to backend/.env # 3. Copy frontend variables to frontend/.env.local # 4. Update DATABASE_URL in backend/.env if using Docker: # DATABASE_URL="postgresql://postgres:postgres@postgres:5432/books" # (use 'postgres' as host instead of 'localhost')