Skip to content

Production databases

Edward O edited this page Mar 26, 2025 · 3 revisions

Prerequisites

  • Basic understanding of Docker
  • Good overview of c2c_org database schema
  • and good knowledge of SQL

Connect to production server

ssh compose0.exoscale.infra.camptocamp.org
source /opt/c2corg-docker/server-list.env

Main database: PostgreSQL

There are 2 instances of the PostgreSQL database, main and backup.

Each instance is inside a docker container. You'll find two container :

  • Main database: /opt/c2corg-docker/composition/production/postgresql-main/
  • Backup database: /opt/c2corg-docker/composition/production/postgresql-backup/

If you need to update data in production, use the main database. Otherwise, for any read-only request, use the backup. Simply do cd <database_container_path>

Search Database: ElasticSearch

There are 3 identical instances of ES: elasticsearch0 to 2

The infrastructure is at production/elasticsearch0/docker-compose.yml.

Steps to upgrade ElasticSearch

Example:

For upgrade procedure, refer to:

As of March 2025, there is no section covering ES administration in the procedures. But the approach is similar to PostgreSQL at least to bump the docker image version. What differs is how to interact with ES rest APIs for migrations.

Older work on Elasticsearch for reference:

  • Integrate advanced search into list views - 2016 Β· #252
  • Add period filter - 2022 Β· #1394

Clone this wiki locally