Closed sw-dev1 closed 1 year ago
I've tried now. Please check those examples:
With this example, the local file conf/ejabberd.yml
is loaded to ejabberd, and used correctly:
version: '3.7'
services:
main:
image: ejabberd/ecs:latest
ports:
- "5222:5222"
- "5280:5280"
volumes:
- ./conf/ejabberd.yml:/home/ejabberd/conf/ejabberd.yml:ro
With this example, all the local conf/
directory is mounted, this allows ejabberd to read ejabberd.yml, certificate files, additional configuration files, etc:
version: '3.7'
services:
main:
image: ejabberd/ecs:latest
ports:
- "5222:5222"
- "5280:5280"
volumes:
- ./conf/:/home/ejabberd/conf/:ro
Thanks. :ro
did the trick.
Just as a side note: for me it works without the trailing/
:
volumes:
- ./conf:/home/ejabberd/conf:ro
Using docker-compose.
Option 1: Follow the Customized Example:
Add (as suggested in Volumes):
Problem: /conf is not mounted to the host, instead created as a docker volume.
Option 2:
The custom ejabberd.yml is in /conf on the host
Problem:
Log error: inetrc is missing
The container starts with the default ejabberd.yml, conf is not mounted to the host, and not created as a docker volume.