mirror of
https://github.com/lfnovo/open-notebook.git
synced 2026-04-30 12:30:01 +00:00
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:
parent
03f9edfec2
commit
b1d4c5cd34
7 changed files with 77 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue