Docker Compose documentation #documentation
Hi, thanks for the great work. I wanted to suggest an addition to the documentation for docker, specifically that the restate server doesn't persist data by default and requires the volume mapped (the location of the volume) and the hostname or RESTATE_NODE_NAME envvar also set.
Please see the discussion on discord here: https://discord.com/channels/1128210118216007792/1306272565186138192
The sample docker compose file below is working for me
services:
restate-server:
container_name: restate-server
image: docker.io/restatedev/restate:1.1
ports:
- 8080:8080
- 9070:9070
- 9071:9071
environment:
- RESTATE_TRACING_ENDPOINT=http://host.docker.internal:4317
- RESTATE_NODE_NAME=<node-name>
volumes:
- /$HOME/restate/data/:/restate-data
extra_hosts:
- "host.docker.internal:host-gateway"
jaeger:
container_name: jaeger
image: jaegertracing/all-in-one:1.46
environment:
- COLLECTOR_OTLP_ENABLED=true
ports:
- 4317:4317
- 16686:16686
You can also always set the node name by passing the RESTATE_NODE_NAME: <name> env var.
You can also always set the node name by passing the
RESTATE_NODE_NAME: <name>env var.
This is actually better I think, will update, thanks
One annoying thing about using docker compose is that it can't access services running outside of docker. Is there a way around this?
One annoying thing about using docker compose is that it can't access services running outside of docker. Is there a way around this?
You can reach services running on the host system by referring to them via host.docker.internal. If your host system is Linux, then you need to add
extra_hosts:
- "host.docker.internal:host-gateway"
to your docker-compose.yml or --add-host=host.docker.internal:host-gateway when using docker directly. Then you can register a service that runs on the host via restate deployment register http://host.docker.internal:9080 and the Restate services running on Docker, can talk to it.