services: db: container_name: lifelens_db image: pgvector/pgvector:pg17 ports: - "5432:5432" volumes: - lifelens_db:/var/lib/postgresql/data environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=mysecretpassword - POSTGRES_DB=lifelens_db healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d lifelens_db"] interval: 10s timeout: 5s retries: 5 start_period: 30s restart: unless-stopped redis: container_name: lifelens_redis image: redis:7-alpine ports: - "6379:6379" restart: unless-stopped backend: container_name: lifelens_backend build: context: ./backend dockerfile: Dockerfile ports: - "8000:80" environment: - DATABASE_URL=postgresql://postgres:mysecretpassword@db:5432/lifelens_db - REDIS_URL=redis://redis:6379 - FRONTEND_URL=http://localhost:5173 - JWT_SECRET_KEY=${JWT_SECRET_KEY:-your_jwt_secret_key_here} - GEMINI_API_KEY=${GEMINI_API_KEY} depends_on: db: condition: service_healthy redis: condition: service_started restart: unless-stopped celery: container_name: lifelens_celery_worker build: context: ./backend dockerfile: Dockerfile command: /app/.venv/bin/celery -A app.tasks worker --loglevel=info environment: - DATABASE_URL=postgresql://postgres:mysecretpassword@db:5432/lifelens_db - REDIS_URL=redis://redis:6379 - LOG_LEVEL=INFO - JWT_SECRET_KEY=${JWT_SECRET_KEY:-your_jwt_secret_key_here} - GEMINI_API_KEY=${GEMINI_API_KEY} depends_on: db: condition: service_healthy redis: condition: service_started restart: unless-stopped frontend: container_name: lifelens_frontend build: context: ./frontend dockerfile: Dockerfile args: - VITE_API_BASE_URL=http://localhost:8000 ports: - "5173:80" depends_on: - backend restart: unless-stopped volumes: lifelens_db: