Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve docker docs #315

Merged
merged 3 commits into from
Mar 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ docker run --rm --pull always -p 8000:8000 surrealdb/surrealdb:latest start
In order to persist data when the Docker instance is restarted or shutdown, specify a Docker folder using the Docker *`-v`* command line argument, and use the on-disk storage engine in SurrealDB using the path prefix chosen as a Docker folder.

```bash
docker run --rm --pull always -p 8000:8000 -v /mydata:/mydata surrealdb/surrealdb:latest start file:/mydata/mydatabase.db
mkdir mydata # Create a directory to store the database, owned by the current user
docker run --rm --pull always -p 8000:8000 --user $(id -u) -v $(pwd)/mydata:/mydata surrealdb/surrealdb:latest start file:/mydata/mydatabase.db
```

The default logging level for the database server is `info`, resulting in any informational logs to be output to the standard output. To control the logging verbosity, specify the *`--log`* argument. The following command starts the database with `trace` level logging, resulting in most logs being output to the terminal.

```bash
docker run --rm --pull always -p 8000:8000 -v /mydata:/mydata surrealdb/surrealdb:latest start --log trace file:/mydata/mydatabase.db
mkdir mydata # Create a directory to store the database, owned by the current user
docker run --rm --pull always -p 8000:8000 --user $(id -u) -v $(pwd)/mydata:/mydata surrealdb/surrealdb:latest start --log trace file:/mydata/mydatabase.db
```

### Enabling authentication
Expand Down