Files
docker-inventaire/docker-compose.yml
jums a9e68d9bba 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
2024-12-25 10:32:21 +01:00

28 lines
736 B
YAML

version: '3'
services:
couchdb:
image: couchdb:3.4.2
ports:
- "5984:5984"
environment:
COUCHDB_USER: "yourcouchdbusername"
COUCHDB_PASSWORD: "yourcouchdbpassword"
volumes:
- 'couchdb:/opt/couchdb/data'
- './configs:/opt/couchdb/etc/local.d'
tty: true
elasticsearch:
image: elasticsearch:7.16.2
environment:
- 'http.host=0.0.0.0'
- 'transport.host=127.0.0.1'
# 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:
couchdb:
elasticsearch: