fix: Docker networking and permissions documentation (#500)

* chore: force env file on api

* fix: Docker networking and permissions documentation

- Add HOSTNAME=0.0.0.0 as default in Dockerfiles for reverse proxy compatibility
- Document Linux extra_hosts requirement for host.docker.internal
- Add user: root to SurrealDB examples for bind mount permissions on Linux
- Update environment reference and reverse proxy docs

Fixes #483, fixes #485, fixes #409
This commit is contained in:
Luis Novo 2026-01-29 23:54:17 -03:00 committed by GitHub
parent 03f9edfec2
commit b1d4c5cd34
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 77 additions and 5 deletions

View file

@ -37,6 +37,7 @@ services:
surrealdb:
image: surrealdb/surrealdb:v2
command: start --user root --pass password --bind 0.0.0.0:8000 rocksdb:/mydata/mydatabase.db
user: root # Required for bind mounts on Linux (SurrealDB runs as non-root by default)
ports:
- "8000:8000"
volumes:
@ -287,6 +288,29 @@ docker compose down -v
docker compose up -d
```
### Database Permission Denied (Linux)
If you see `Permission denied` or `Failed to create RocksDB directory` in SurrealDB logs:
```bash
docker compose logs surrealdb | grep -i permission
```
This happens because SurrealDB runs as a non-root user but Docker creates bind mount directories as root. Add `user: root` to the surrealdb service:
```yaml
surrealdb:
image: surrealdb/surrealdb:v2
user: root # Fix for Linux bind mount permissions
# ... rest of config
```
Then restart:
```bash
docker compose down -v
docker compose up -d
```
---
## Next Steps