Andrey,
glad to see you found the solution already. Note that on Linux (and MacOS) you can also use named volumes. The notation you are using here (with “:”) is translated to direct volume mounts, so they won’t show up if you use “docker volume ls”.
BTW I would strongly advise against setting the container’s hostname to “localhost”, as that is a reserved name. You can instead add another volume for “/config” and put a file “axonserver.properties” in there with “axoniq.axonserver.hostname=localhost”. This will do what you want, without confusing the rest of Docker. Another way to achieve this result would be to define a secret for the properties file and mount that into the “/config” directory:
version: ‘3.3’
services:
axonserver:
image: axoniq/axonserver
hostname: axonserver
volumes:
target: /config/axonserver.properties
ports:
-
‘8024:8024’
-
‘8124:8124’
networks:
-
axon-network
volumes:
axonserver-data:
driver: local
driver_opts:
o: bind
type: none
device: /data/axon
axonserver-events:
driver: local
driver_opts:
o: bind
type: none
device: /data/axon/eventdata
networks:
axon-network:
secrets:
axonserver-properties:
file: ./axonserver.properties
Cheers,
Bert Laverman