Skip to content

Database

agennadi edited this page Feb 3, 2025 · 13 revisions

For local development, we use PostgreSQL running in a Docker container with the following setup:

  • Data Persistence: Configured to use a Docker volume to retain database files between container restarts.

  • Initialization Script: Executes backend/database/init_db.py script to create tables and scripts in backend/etl folder to load the data upon build.

  • Geospatial Support: PostGIS extension installed for spatial data handling.

  • Networking: Exposed on the default PostgreSQL port (5432) and linked to the backend container within the Docker network.

Note that not all database tables are currently used. Tables neighborhoods and addresses can potentially be used in the future. The data in the tables landslide_zones and seismic_hazard_zones doesn't seem to be complete - we are waiting for the DataSF updates.

er diagram

Clone this wiki locally