Skip to content

Commit ac1c8e6

Browse files
committed
feat: rerun tzdata and add doc updates for #7, #12 and #17
Add a step to run tzdata during config to try and resolve #7 Added documentation on font mapping #12 Added documentation on using NPM #17
1 parent 2a53e48 commit ac1c8e6

File tree

2 files changed

+58
-1
lines changed

2 files changed

+58
-1
lines changed

README.md

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@ Use `http://localhost:8080/` to access it locally, do not expose this to the web
1313
- [Docker CLI example](#docker-cli-example)
1414
- [Reloading Obsidan in the Browser](#reloading-obsidan-in-the-browser)
1515
- [Setting PUID and PGID](#setting-puid-and-pgid)
16+
- [Adding missing fonts](#adding-missing-fonts)
17+
- [Map font file using Docker CLI](#map-font-file-using-docker-cli)
18+
- [Map font file using Docker Compose](#map-font-file-using-docker-compose)
1619
- [Hosting behind a reverse proxy](#hosting-behind-a-reverse-proxy)
1720
- [Example nginx configuration](#example-nginx-configuration)
21+
- [Hosting behind Nginx Proxy Manager (NPM)](#hosting-behind-nginx-proxy-manager-npm)
1822
- [Updating Obsidian](#updating-obsidian)
1923
- [Building locally](#building-locally)
2024

@@ -135,9 +139,28 @@ It is most likely that you will use the id of yourself, which can be obtained by
135139
id $user
136140
```
137141

142+
## Adding missing fonts
143+
144+
Thanks to @aaron-jang for this example.
145+
146+
Download the font of the language that you want to use in Obsidian and add it to the volume as shown below.
147+
148+
### Map font file using Docker CLI
149+
150+
```PowerShell
151+
-v {downloaded font directory}:/usr/share/fonts/truetype/{font name}
152+
```
153+
154+
### Map font file using Docker Compose
155+
156+
```PowerShell
157+
volumes:
158+
- {downloaded font directory}:/usr/share/fonts/truetype/{font name}
159+
```
160+
138161
## Hosting behind a reverse proxy
139162

140-
If you whish to do that **please make sure you are securing it in some way!**. You also need to ensure **websocket** support is enabled.
163+
If you wish to do that **please make sure you are securing it in some way!**. You also need to ensure **websocket** support is enabled.
141164

142165
### Example nginx configuration
143166

@@ -172,6 +195,37 @@ server {
172195
}
173196
```
174197

198+
## Hosting behind Nginx Proxy Manager (NPM)
199+
200+
Thanks to @fahrenhe1t for this example.
201+
202+
If you install obsidian-remote in Docker, you can proxy it through [Nginx Proxy Manager](https://nginxproxymanager.com/) (NPM - running on the same Docker instance), and use an access list to provide user authentication. The obsidian-remote container would have to be on the same network as Nginx Proxy Manager. If you don't expose the IP external to the container, authentication would be forced through NPM:
203+
204+
```yaml
205+
version: '3.8'
206+
services:
207+
obsidian:
208+
image: 'ghcr.io/sytone/obsidian-remote:latest'
209+
container_name: obsidian-remote
210+
restart: unless-stopped
211+
ports:
212+
- 8080 #only exposes port internally to the container
213+
volumes:
214+
- /home/obsidian/vaults:/vaults
215+
- /home/obsidian/config:/config
216+
environment:
217+
- PUID=1000
218+
- PGID=1000
219+
- TZ=America/Los_Angeles
220+
- DOCKER_MODS=linuxserver/mods:universal-git
221+
networks:
222+
default:
223+
name: <your nginx proxy manager network>
224+
external: true
225+
```
226+
227+
Create a proxy host in NPM pointing to the "obsidian-remote:8080" container, choose your domain name, use a LetsEncrypt SSL certificate, enable WebSockets. This video talks about it: [Nginx Proxy Manager - ACCESS LIST protection for internal services](https://www.youtube.com/watch?v=G9voYZejH48)
228+
175229
## Updating Obsidian
176230
177231
By default obsidian will update itself in the container. If you recreate the container you will have to do the update again. This repo will be updated periodically to keep up with the latest version of Obsidian.

root/etc/cont-init.d/50-config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ echo "********************************"
2121
echo "**** Start Date Information ****"
2222
echo "********************************"
2323
echo "TZ: ${TZ}"
24+
echo "Running dpkg-reconfigure -f noninteractive tzdata"
25+
echo "${TZ}" >/etc/timezone
26+
dpkg-reconfigure -f noninteractive tzdata
2427
echo "Date UTC"
2528
date --utc
2629
echo "Date Local"

0 commit comments

Comments
 (0)