Skip to content

Commit

Permalink
docs: add information to resolve Please add git to the container #5
Browse files Browse the repository at this point in the history
  • Loading branch information
sytone committed Mar 19, 2022
1 parent eca2bc5 commit c77f984
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 @@ -4,36 +4,58 @@ This docker image allows you to run obsidian in docker as a container and access

Use `http://localhost:8080/` to access it locally, do not expose this to the web unless you secure it and know what you are doing!!

## Using Container
## Using the Container

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 `
-v D:/ob/config:/config `
-p 8080:8080 `
ghcr.io/sytone/obsidian-remote:latest
```

To run it as a daemon.
To run it as a daemon in the background.

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

### Mapped Volumes

| Path | Description |
| --------- | ------------------------------------------------------------------------- |
| `/vaults` | The location on the host for your Obsidian Vaults |
| `/config` | The location to store Obsidan configuration and ssh data for obsidian-git |

## Enabling GIT for the obsidian-git plugin

This container uses the base images from linuxserver.io. This means you can the linuxserver.io mods. To add support for git add the `DOCKER_MODS` environment variable like so `DOCKER_MODS=linuxserver/mods:universal-git`.

### Docker CLI example

```PowerShell
docker run -d `
-v D:/ob/vaults:/vaults `
-v D:/ob/config:/config `
-p 8080:8080 `
-e DOCKER_MODS=linuxserver/mods:universal-git `
ghcr.io/sytone/obsidian-remote:latest
```

## 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 `
-v D:/ob/config:/config `
-e PUID=1000 `
-e PGID=1000 `
-p 8080:8080 `
Expand Down Expand Up @@ -70,7 +92,7 @@ To run the localy build image:
```PowerShell
docker run --rm -it `
-v D:/ob/vaults:/vaults `
-v D:/ob/config:/config/.config/obsidian `
-v D:/ob/config:/config `
-p 8080:8080 `
obsidian-remote:latest bash
```
Expand All @@ -88,7 +110,7 @@ services:
- 8585:8080
volumes:
- /home/obsidian/vaults:/vaults
- /home/obsidian/config:/config/.config/obsidian
- /home/obsidian/config:/config
environment:
- PUID=1000
- PGID=1000
Expand Down

0 comments on commit c77f984

Please sign in to comment.