Skip to content

Commit

Permalink
improve docker docs (#315)
Browse files Browse the repository at this point in the history
Signed-off-by: Agustín Ramiro Díaz <agustin.ramiro.diaz@gmail.com>
Co-authored-by: ekwuno <Obinnacodes@gmail.com>
  • Loading branch information
AgustinRamiroDiaz and Ekwuno committed Mar 15, 2024
1 parent ba1a86a commit e219c02
Showing 1 changed file with 4 additions and 2 deletions.
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

0 comments on commit e219c02

Please sign in to comment.