From 0f5b8ca7c0a2762bfba053d84a66b408f1a2be65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Bournhonesque?= Date: Tue, 20 Aug 2024 15:13:57 +0200 Subject: [PATCH] chore: bring back robotoff-backups The robotoff_backup volume was removed until Robotoff migration to Moji was completed. The NFS mount was created manually on Moji server. --- Makefile | 2 ++ docker-compose.yml | 3 +++ docker/prod.yml | 3 +++ 3 files changed, 8 insertions(+) diff --git a/Makefile b/Makefile index 012d696aed..4c67f91389 100644 --- a/Makefile +++ b/Makefile @@ -234,6 +234,8 @@ create_external_volumes: @echo "🥫 Creating external volumes (production only) …" docker volume create robotoff_postgres-data docker volume create robotoff_es-data +# In production, robotoff_backup is a NFS mount, this should be created manually in production + docker volume create robotoff_backup create_external_networks: diff --git a/docker-compose.yml b/docker-compose.yml index 5efcdd8bfa..60a914f0fb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -125,6 +125,7 @@ services: - POSTGRES_DB volumes: - postgres-data:/var/lib/postgresql/data + - backup:/opt/robotoff-backups - ./scripts/backup_postgres.sh:/opt/backup_postgres.sh command: postgres -c shared_buffers=${ROBOTOFF_POSTGRES_SHARED_BUFFERS} -c work_mem=${ROBOTOFF_POSTGRES_WORK_MEM} mem_limit: 20g @@ -170,6 +171,8 @@ volumes: name: ${COMPOSE_PROJECT_NAME:-robotoff}_es-data redis-data: name: ${COMPOSE_PROJECT_NAME:-robotoff}_redis-data + backup: + name: ${COMPOSE_PROJECT_NAME:-robotoff}_backup networks: default: diff --git a/docker/prod.yml b/docker/prod.yml index 23c78a0aac..6e04ea9395 100644 --- a/docker/prod.yml +++ b/docker/prod.yml @@ -5,6 +5,9 @@ volumes: es-data: external: true name: ${COMPOSE_PROJECT_NAME:-robotoff}_es-data + backup: + external: true + name: ${COMPOSE_PROJECT_NAME:-robotoff}_backup networks: