open-notebook/docker-compose.override.yml.example
Luis Novo 7df4acdb7d
docs: stop teaching 0.0.0.0 SurrealDB port exposure in setup snippets (#1060)
* docs: stop teaching 0.0.0.0 SurrealDB port exposure in setup snippets

Bind port 8000 to 127.0.0.1 in every compose and docker run snippet
(README, quick starts, installation, configuration and development docs,
and the examples/docker-compose-*.yml files), matching the shipped
docker-compose.yml from #1025. Drop the redundant --bind 0.0.0.0:8000
from containerized surreal start commands (it is the in-container
default) and add !override to docker-compose.override.yml.example so the
opt-in re-publish actually replaces the base port binding instead of
colliding with it. Docs that discuss reaching the database from another
machine now point at the override example plus a firewall/SSH-tunnel
note.

Closes #1034

* docs: parameterize creds in manual compose example, note Compose version for !override
2026-07-12 08:42:52 -03:00

23 lines
1.1 KiB
Text

# Local Docker Compose override — copy to `docker-compose.override.yml`
# (which `docker compose up` merges automatically) to apply host-specific
# tweaks without touching the tracked docker-compose.yml.
#
# cp docker-compose.override.yml.example docker-compose.override.yml
#
# The example below re-exposes SurrealDB's port on all interfaces. The
# shipped default binds it to 127.0.0.1 only, because the database starts
# with root:root credentials and exposing it on 0.0.0.0 lets anyone who can
# reach the host connect as root. Only re-expose it if you actually need to
# reach the database from another machine (e.g. Surrealist on your laptop),
# and put it behind a firewall or an SSH tunnel and set SURREAL_USER /
# SURREAL_PASSWORD to real credentials first.
services:
surrealdb:
# `!override` replaces the base file's port list instead of merging with
# it — without it, compose keeps both entries and the container fails to
# start with "port is already allocated". Requires Docker Compose
# v2.24.4+; on older clients, edit the ports entry in docker-compose.yml
# directly instead.
ports: !override
- "8000:8000"