docker-compose.yml: add volumes to preserve local images, cache data, and eventual backups

This commit relies on the possibility to customize the LevelDB directory
introduced in https://github.com/inventaire/inventaire/commit/4fb86f6
This commit is contained in:
maxlath
2025-04-15 20:39:09 +02:00
parent f9419539ba
commit f7e376ca06
4 changed files with 23 additions and 6 deletions

View File

@@ -9,9 +9,13 @@ services:
depends_on:
- couchdb
- elasticsearch
# Uncomment if you want to access the code:
volumes:
- inventaire-server:/opt/inventaire
# The following paths are outside /opt/inventaire so that the inventaire-server volume can be removed
# (as required when updating the server and client) without loosing their data
- inventaire-leveldb:/opt/inventaire_leveldb
- inventaire-local-media-storage:/opt/inventaire_local_media_storage
- inventaire-backups:/opt/inventaire_backups
logging:
options:
max-size: "10m"
@@ -67,6 +71,7 @@ services:
- inventaire-server:/opt/inventaire
- certbot-www:/var/www/certbot
- ./certbot/conf:/etc/letsencrypt
- nginx-cache:/tmp/nginx
env_file: .env
depends_on:
# Required to be able to define the `inventaire` host as an upstream
@@ -87,3 +92,7 @@ volumes:
elasticsearch:
certbot-www:
inventaire-server:
inventaire-leveldb:
inventaire-local-media-storage:
inventaire-backups:
nginx-cache: