add named volumes to couchdb and elasticsearch

deleted by 71c1cc2, but docker still needs those volumes to save its
service data somewhere on the host, otherwise it will recreate dbs at
every container restart
This commit is contained in:
jums
2024-12-25 10:32:11 +01:00
parent 51b7fbc6aa
commit a9e68d9bba

View File

@@ -8,6 +8,7 @@ services:
COUCHDB_USER: "yourcouchdbusername"
COUCHDB_PASSWORD: "yourcouchdbpassword"
volumes:
- 'couchdb:/opt/couchdb/data'
- './configs:/opt/couchdb/etc/local.d'
tty: true
elasticsearch:
@@ -18,6 +19,8 @@ services:
# See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/docker.html
- 'discovery.type=single-node'
- 'ES_JAVA_OPTS=-Xms1g -Xmx1g'
volumes:
- 'elasticsearch:/usr/share/elasticsearch/data'
ports :
- '127.0.0.1:9200:9200'
volumes: