This commit is contained in:
Jeff Clement 2024-11-18 00:13:19 -07:00
parent 650a2fdd28
commit dbe9f65940
Signed by: jeff
GPG key ID: 3BCB43A3F0E1D7DA
4 changed files with 74 additions and 0 deletions

9
wikijs_tailscale/.env Normal file
View file

@ -0,0 +1,9 @@
# Tailscale authorization key
TS_AUTHKEY= ##REQUIRED##
# Tailscale tailnet node name
TAILNET_NAME=wiki
TAILNET_SUFFIX=????.ts.net
# strong password for the database
DB_PASSWORD= ##REQUIRED##

View file

@ -0,0 +1,5 @@
# Wiki.js via. Tailscale
Wikis are a great place to capture documentation, and Wiki.js is a great Wiki. This project configures an internal copy of Wiki.js on your Tailnet.
Just update the values in `.env` and `docker compose up -d`.

View file

@ -0,0 +1,44 @@
services:
tailscale:
hostname: ${TAILNET_NAME}
image: tailscale/tailscale
volumes:
- ./data/tailscale:/var/lib/tailscale
- ./ts-serve.json:/config/ts-serve.json:ro
- /dev/net/tun:/dev/net/tun
cap_add:
- net_admin
- sys_module
environment:
TS_AUTHKEY: ${TS_AUTHKEY}
TS_SERVE_CONFIG: /config/ts-serve.json
TS_AUTH_ONCE: true
TS_STATE_DIR: /var/lib/tailscale
TS_HOST: ${TAILNET_NAME}
restart: unless-stopped
db:
image: postgres:15-alpine
environment:
POSTGRES_DB: wiki
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: wikijs
logging:
driver: "none"
restart: unless-stopped
volumes:
- ./data/db:/var/lib/postgresql/data
server:
image: ghcr.io/requarks/wiki:2
depends_on:
- db
environment:
DB_TYPE: postgres
DB_HOST: db
DB_PORT: 5432
DB_USER: wikijs
DB_PASS: ${DB_PASSWORD}
DB_NAME: wiki
restart: unless-stopped

View file

@ -0,0 +1,16 @@
{
"TCP": {
"443": {
"HTTPS": true
}
},
"Web": {
"${TS_CERT_DOMAIN}:443": {
"Handlers": {
"/": {
"Proxy": "http://server:3000"
}
}
}
}
}