Skip to content

Commit

Permalink
chore: bring back robotoff-backups
Browse files Browse the repository at this point in the history
The robotoff_backup volume was removed until Robotoff migration to Moji
was completed.

The NFS mount was created manually on Moji server.
  • Loading branch information
raphael0202 committed Aug 20, 2024
1 parent c99b2c1 commit 0f5b8ca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions docker/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 0f5b8ca

Please sign in to comment.