- Add comprehensive CouchDB setup and configuration - Update Docker files for CouchDB compatibility - Create Kubernetes manifests for CouchDB deployment - Add migration scripts and documentation - Update seeding scripts to support both CouchDB and MongoDB - Add docker-compose for local development - Create comprehensive setup and deployment guides 🤖 Generated with [AI Assistant] Co-Authored-By: AI Assistant <noreply@ai-assistant.com>
103 lines
2.6 KiB
YAML
103 lines
2.6 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
couchdb:
|
|
image: couchdb:3.3
|
|
container_name: adopt-a-street-couchdb
|
|
ports:
|
|
- "5984:5984"
|
|
- "4369:4369"
|
|
- "9100:9100"
|
|
environment:
|
|
- COUCHDB_USER=admin
|
|
- COUCHDB_PASSWORD=admin
|
|
- COUCHDB_SECRET=some-random-secret-string
|
|
- NODENAME=couchdb@localhost
|
|
- ERL_FLAGS=+K true +A 4
|
|
volumes:
|
|
- couchdb_data:/opt/couchdb/data
|
|
- ./couchdb/local.d:/opt/couchdb/etc/local.d
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:5984/_up"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
couchdb-exporter:
|
|
image: gesellix/couchdb-exporter:latest
|
|
container_name: adopt-a-street-couchdb-exporter
|
|
ports:
|
|
- "9100:9100"
|
|
environment:
|
|
- COUCHDB_URL=http://localhost:5984
|
|
- COUCHDB_USER=admin
|
|
- COUCHDB_PASSWORD=admin
|
|
depends_on:
|
|
couchdb:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
container_name: adopt-a-street-backend
|
|
ports:
|
|
- "5000:5000"
|
|
environment:
|
|
- COUCHDB_URL=http://couchdb:5984
|
|
- COUCHDB_DB_NAME=adopt-a-street
|
|
- COUCHDB_USER=admin
|
|
- COUCHDB_PASSWORD=admin
|
|
- JWT_SECRET=your-super-secret-jwt-key-change-in-production
|
|
- PORT=5000
|
|
- NODE_ENV=development
|
|
- FRONTEND_URL=http://localhost:3000
|
|
- CLOUDINARY_CLOUD_NAME=${CLOUDINARY_CLOUD_NAME}
|
|
- CLOUDINARY_API_KEY=${CLOUDINARY_API_KEY}
|
|
- CLOUDINARY_API_SECRET=${CLOUDINARY_API_SECRET}
|
|
- STRIPE_SECRET_KEY=${STRIPE_SECRET_KEY}
|
|
- STRIPE_PUBLISHABLE_KEY=${STRIPE_PUBLISHABLE_KEY}
|
|
- OPENAI_API_KEY=${OPENAI_API_KEY}
|
|
volumes:
|
|
- ./backend/uploads:/app/uploads
|
|
depends_on:
|
|
couchdb:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:5000/api/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
container_name: adopt-a-street-frontend
|
|
ports:
|
|
- "3000:80"
|
|
environment:
|
|
- REACT_APP_API_URL=http://localhost:5000
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:80"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
volumes:
|
|
couchdb_data:
|
|
driver: local
|
|
|
|
networks:
|
|
default:
|
|
name: adopt-a-street-network |