Skip to content

Commit a3b0723

Browse files
author
michaelhodges
committed
New Service XWiki
1 parent 963ef66 commit a3b0723

5 files changed

Lines changed: 132 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ ScaleTail provides ready-to-run [Docker Compose](https://docs.docker.com/compose
155155
| 🗃️ **Vaultwarden** | An unofficial Bitwarden server implementation written in Rust. | [Details](services/vaultwarden) |
156156
|**Vikunja** | A self-hosted task and project management platform with projects, reminders, labels, recurring tasks, and collaboration features. | [Details](services/vikunja) |
157157
| 💸 **Wallos** | An open-source, self-hostable web app to track and manage your recurring subscriptions and expenses, with multi-currency support, customizable categories, and statistics. | [Details](services/wallos) |
158+
| 📚 **XWiki** |XWiki offers a generic platform for developing projects and collaborative applications using the wiki paradigm.|[Details](services/xwiki)|
158159

159160
### 📊 Dashboards and Visualization
160161

services/xwiki/.env

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#version=1.1
2+
#URL=https://github.com/tailscale-dev/ScaleTail
3+
#COMPOSE_PROJECT_NAME= # Optional: only use when running multiple deployments on the same infrastructure.
4+
5+
# Service Configuration
6+
SERVICE=xwiki # Service name (e.g., adguard). Used as hostname in Tailscale and for container naming (app-${SERVICE}).
7+
IMAGE_URL=xwiki:stable-mariadb-tomcat # Docker image URL from container registry (e.g., adguard/adguard-home).
8+
9+
# Network Configuration
10+
SERVICEPORT=80 # Port to expose to local network. Uncomment the "ports:" section in compose.yaml to enable.
11+
DNS_SERVER=9.9.9.9 # Preferred DNS server for Tailscale. Uncomment the "dns:" section in compose.yaml to enable.
12+
13+
# Tailscale Configuration
14+
TS_AUTHKEY= # Auth key from https://tailscale.com/admin/authkeys. See: https://tailscale.com/kb/1085/auth-keys#generate-an-auth-key for instructions.
15+
16+
# Time Zone setting for containers
17+
TZ=Europe/Amsterdam # See: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
18+
19+
# Optional Service variables
20+
# PUID=1000
21+
22+
23+
#EXAMPLE_VAR="Environment varibale"
24+
25+
# Default environment values
26+
XWIKI_VERSION=18.2.1
27+
DB_USER=xwiki
28+
DB_PASSWORD=xwiki
29+
DB_DATABASE=xwiki
30+
MARIADB_ROOT_PASSWORD=xwiki

services/xwiki/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
3+
4+
5+
# XWiki with Tailscale Sidecar Configuration
6+
7+
This Docker Compose configuration sets up [XWiki](https://www.xwiki.org) with Tailscale as a sidecar container to securely deliver push notifications over a private Tailscale network. By integrating Tailscale in a sidecar configuration, you enhance the privacy and security of your ntfy instance, ensuring it is only accessible within your Tailscale network.
8+
9+
## XWiki
10+
11+
[XWiki](https://www.xwiki.org) offers a generic platform for developing projects and collaborative applications using the wiki paradigm.
12+
13+
## Configuration Overview
14+
15+
In this setup, the `tailscale-xwiki` service runs the Tailscale daemon to provide secure, private networking. The `xwiki` service is configured to use Tailscale’s network stack via Docker’s `network_mode: service:` syntax. This binds Paperless network interface to the Tailscale container, making the service available only through your Tailscale network (or locally, if needed).

services/xwiki/compose.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
configs:
2+
ts-serve:
3+
content: |
4+
{"TCP":{"443":{"HTTPS":true}},
5+
"Web":{"$${TS_CERT_DOMAIN}:443":
6+
{"Handlers":{"/":
7+
{"Proxy":"http://127.0.0.1:8080"}}}},
8+
"AllowFunnel":{"$${TS_CERT_DOMAIN}:443":false}}
9+
10+
services:
11+
# Make sure you have updated/checked the .env file with the correct variables.
12+
# All the ${ xx } need to be defined there.
13+
# Tailscale Sidecar Configuration
14+
tailscale:
15+
image: tailscale/tailscale:latest # Image to be used
16+
container_name: tailscale-${SERVICE} # Name for local container management
17+
hostname: ${SERVICE} # Name used within your Tailscale environment
18+
environment:
19+
- TS_AUTHKEY=${TS_AUTHKEY}
20+
- TS_STATE_DIR=/var/lib/tailscale
21+
- TS_SERVE_CONFIG=/config/serve.json # Tailscale Serve configuration to expose the web interface on your local Tailnet - remove this line if not required
22+
- TS_USERSPACE=false
23+
- TS_ENABLE_HEALTH_CHECK=true # Enable healthcheck endpoint: "/healthz"
24+
- TS_LOCAL_ADDR_PORT=127.0.0.1:41234 # The <addr>:<port> for the healthz endpoint
25+
#- TS_ACCEPT_DNS=true # Uncomment when using MagicDNS
26+
- TS_AUTH_ONCE=true
27+
configs:
28+
- source: ts-serve
29+
target: /config/serve.json
30+
volumes:
31+
- ./config:/config # Config folder used to store Tailscale files - you may need to change the path
32+
- ./ts/state:/var/lib/tailscale # Tailscale requirement - you may need to change the path
33+
devices:
34+
- /dev/net/tun:/dev/net/tun # Network configuration for Tailscale to work
35+
cap_add:
36+
- net_admin # Tailscale requirement
37+
#ports:
38+
# - 0.0.0.0:${SERVICEPORT}:${SERVICEPORT} # Binding port ${SERVICE}PORT to the local network - may be removed if only exposure to your Tailnet is required
39+
# If any DNS issues arise, use your preferred DNS provider by uncommenting the config below
40+
# dns:
41+
# - ${DNS_SERVER}
42+
healthcheck:
43+
test: ["CMD", "wget", "--spider", "-q", "http://127.0.0.1:41234/healthz"] # Check Tailscale has a Tailnet IP and is operational
44+
interval: 1m # How often to perform the check
45+
timeout: 10s # Time to wait for the check to succeed
46+
retries: 3 # Number of retries before marking as unhealthy
47+
start_period: 10s # Time to wait before starting health checks
48+
restart: always
49+
50+
application:
51+
image: ${IMAGE_URL}
52+
network_mode: service:tailscale
53+
container_name: app-${SERVICE}
54+
depends_on:
55+
tailscale:
56+
condition: service_healthy
57+
db:
58+
condition: service_started
59+
environment:
60+
- XWIKI_VERSION=${XWIKI_VERSION}
61+
- DB_USER=${DB_USER}
62+
- DB_PASSWORD=${DB_PASSWORD}
63+
- DB_DATABASE=${DB_DATABASE}
64+
- DB_HOST=db-${SERVICE}
65+
volumes:
66+
- ./${SERVICE}-data/xwiki:/usr/local/xwiki
67+
restart: always
68+
db:
69+
image: "mariadb:12"
70+
container_name: db-${SERVICE}
71+
volumes:
72+
- ./${SERVICE}-data/mariadb:/var/lib/mysql
73+
- type: bind
74+
source: ./init.sql
75+
target: /docker-entrypoint-initdb.d/init.sql
76+
environment:
77+
- MARIADB_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
78+
- MARIADB_USER=${DB_USER}
79+
- MARIADB_PASSWORD=${DB_PASSWORD}
80+
- MARIADB_DATABASE=${DB_DATABASE}
81+
command:
82+
- "--character-set-server=utf8mb4"
83+
- "--collation-server=utf8mb4_bin"
84+
- "--explicit-defaults-for-timestamp=1"
85+
restart: always

services/xwiki/init.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
grant all privileges on *.* to xwiki@'%'

0 commit comments

Comments
 (0)