Skip to content

Fix backend network errors and cleanup dev environment #459

@TineoC

Description

@TineoC

Problem

Users (e.g., @henry07) have reported a "network error" when trying to use the site's backend features (JJ chatbot, form results) on their local machines. This is primarily caused by a race condition where the backend container attempts to connect to the PostgreSQL database before the pgvector extension has finished building and the database is ready to accept connections.

Additionally, the development environment contains unnecessary Kubernetes/Devbox configuration files and documentation that clutter the project and confuse new contributors.

Proposed Changes

  1. Fix Backend Connectivity:
    • Add a healthcheck to the db service in docker-compose.yml.
    • Update the backend service to depend on the db service being healthy.
    • Add a restart policy to the backend service for better resilience.
  2. Environment Cleanup:
    • Remove devbox.json, devbox.lock, and the .devbox/ directory.
    • Remove the deploy/ directory containing local Kubernetes manifests.
    • Remove docker-compose.prod.yml to simplify local development (keeping Dockerfile.prod for CI).
  3. Documentation Improvements:
    • Update README.md to clarify the Docker Compose setup and remove deprecated Kubernetes instructions.
    • Fix environment file typo in documentation (config/env/env.dev -> config/env/dev.env).
    • Update CLAUDE.md and docs/DATABASE_CONNECTION.md to reflect the simplified development environment.

Verification

  • Run docker compose up --build and verify the backend waits for the database to be healthy.
  • Verify the frontend can successfully communicate with the backend services.
  • Ensure no lingering references to Devbox or Kind remain in the active documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions