Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sytone committed Mar 17, 2022
1 parent ad35dd4 commit 707785c
Showing 1 changed file with 29 additions and 7 deletions.
36 changes: 29 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,38 @@ Use `http://localhost:8080/` to access it locally, do not expose this to the web

## Using Container

To run a interactive version to test it out.
To run a interactive version to test it out. This is using windows based path, update for the OS you are running on.

```PowerShell
docker run --rm -it -v D:/ob/vaults:/vaults -v D:/ob/config:/config/.config/obsidian -p 8080:8080 ghcr.io/sytone/obsidian-remote:latest
docker run --rm -it `
-v D:/ob/vaults:/vaults `
-v D:/ob/config:/config/.config/obsidian `
-p 8080:8080 `
ghcr.io/sytone/obsidian-remote:latest
```

To run it as a daemon.

```PowerShell
docker run -d -v D:/ob/vaults:/vaults -v D:/ob/config:/config/.config/obsidian -p 8080:8080 --name obsidian-remote ghcr.io/sytone/obsidian-remote:latest
docker run -d `
-v D:/ob/vaults:/vaults `
-v D:/ob/config:/config/.config/obsidian `
-p 8080:8080 `
ghcr.io/sytone/obsidian-remote:latest
```

Docker Environment Parameters
## Setting PUID and PGID

To set PUID and PGID use the follow environment variables on the command line, by default the IDs are 911/911

```PowerShell
docker run --rm -it -v D:/ob/vaults:/vaults -v D:/ob/config:/config/.config/obsidian -e PUID=1000 -e PGID=1000 -p 8080:8080 ghcr.io/sytone/obsidian-remote:latest
docker run --rm -it `
-v D:/ob/vaults:/vaults `
-v D:/ob/config:/config/.config/obsidian `
-e PUID=1000 `
-e PGID=1000 `
-p 8080:8080 `
ghcr.io/sytone/obsidian-remote:latest
```

Or, if you use docker-compose, add them to the environment: section:
Expand All @@ -45,13 +59,21 @@ id $user
To build and use it locally run the following commands:

```PowerShell
docker build --pull --rm --build-arg BUILD_DATE=$(date -uformat +"%Y%m%d") -f "Dockerfile" -t obsidian-remote:latest "."
docker build --pull --rm --build-arg `
BUILD_DATE=$(date -uformat +"%Y%m%d") `
-f "Dockerfile" `
-t obsidian-remote:latest `
"."
```

To run the localy build image:

```PowerShell
docker run --rm -it -v D:/ob/vaults:/vaults -v D:/ob/config:/config/.config/obsidian -p 8080:8080 obsidian-remote:latest bash
docker run --rm -it `
-v D:/ob/vaults:/vaults `
-v D:/ob/config:/config/.config/obsidian `
-p 8080:8080 `
obsidian-remote:latest bash
```

## Using Docker Compose
Expand Down

0 comments on commit 707785c

Please sign in to comment.