config: Add 15 and update 3 files
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 40s
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 40s
This commit is contained in:
@@ -5,7 +5,7 @@ CONTAINER_NAME=logserver
|
|||||||
SSH_USER="root"
|
SSH_USER="root"
|
||||||
|
|
||||||
# Ports
|
# Ports
|
||||||
WEB_PORT=3000 # Grafana web UI
|
WEB_PORT=3001 # Grafana web UI
|
||||||
LOKI_PORT=3100 # Loki API (for clients to send logs)
|
LOKI_PORT=3100 # Loki API (for clients to send logs)
|
||||||
|
|
||||||
# Authentication for Grafana
|
# Authentication for Grafana
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ CONTAINER_NAME=simple-logs
|
|||||||
SSH_USER="root"
|
SSH_USER="root"
|
||||||
|
|
||||||
# Web UI Port
|
# Web UI Port
|
||||||
WEB_PORT=3000
|
WEB_PORT=3002
|
||||||
|
|
||||||
# Log retention (days)
|
# Log retention (days)
|
||||||
LOG_RETENTION=7
|
LOG_RETENTION=7
|
||||||
|
|||||||
@@ -2,10 +2,11 @@
|
|||||||
"caddy": "1.0.0",
|
"caddy": "1.0.0",
|
||||||
"cloudflare-tunnel": "1.0.0",
|
"cloudflare-tunnel": "1.0.0",
|
||||||
"gitea-runner-docker": "1.0.0",
|
"gitea-runner-docker": "1.0.0",
|
||||||
|
"logserver": "1.0.1",
|
||||||
"simple-object-server": "1.0.0",
|
"simple-object-server": "1.0.0",
|
||||||
"squashdisplay": "1.0.0",
|
"squashdisplay": "1.0.0",
|
||||||
"static-website": "1.0.0",
|
"static-website": "1.0.0",
|
||||||
"tailscale": "1.0.0",
|
"tailscale": "1.0.0",
|
||||||
"watchtower": "1.0.0",
|
"watchtower": "1.0.0",
|
||||||
"logserver": "1.0.1"
|
"wikijs": "1.0.0"
|
||||||
}
|
}
|
||||||
|
|||||||
64
wikijs/README.txt
Normal file
64
wikijs/README.txt
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
Wiki.js Dropshell Template
|
||||||
|
==========================
|
||||||
|
|
||||||
|
A modern, lightweight and powerful wiki application built on Node.js.
|
||||||
|
Uses the LinuxServer.io container image for easy deployment.
|
||||||
|
|
||||||
|
Source: https://hub.docker.com/r/linuxserver/wikijs
|
||||||
|
Docs: https://docs.linuxserver.io/images/docker-wikijs
|
||||||
|
|
||||||
|
Configuration
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Edit config/service.env to customize your installation:
|
||||||
|
|
||||||
|
CONTAINER_NAME - Name for the Docker container (default: wikijs)
|
||||||
|
IMAGE_TAG - Docker image tag (default: latest)
|
||||||
|
DATA_PATH - Host path for persistent storage (default: /home/dropshell/wikijs)
|
||||||
|
HTTP_PORT - Web interface port (default: 3080)
|
||||||
|
PUID - User ID for file permissions (default: 1000)
|
||||||
|
PGID - Group ID for file permissions (default: 1000)
|
||||||
|
TZ - Timezone (default: Etc/UTC)
|
||||||
|
|
||||||
|
Ports
|
||||||
|
-----
|
||||||
|
|
||||||
|
3000 - Web interface (configurable via HTTP_PORT)
|
||||||
|
|
||||||
|
Data Storage
|
||||||
|
------------
|
||||||
|
|
||||||
|
All persistent data is stored in DATA_PATH:
|
||||||
|
- config/ - Wiki.js configuration files
|
||||||
|
- data/ - Wiki content and database
|
||||||
|
|
||||||
|
First Run
|
||||||
|
---------
|
||||||
|
|
||||||
|
After installation, access Wiki.js at http://your-server:3080
|
||||||
|
You will be guided through the initial setup wizard to:
|
||||||
|
- Create an administrator account
|
||||||
|
- Configure authentication methods
|
||||||
|
- Set up your wiki settings
|
||||||
|
|
||||||
|
Database
|
||||||
|
--------
|
||||||
|
|
||||||
|
By default, Wiki.js uses SQLite which requires no additional setup.
|
||||||
|
For PostgreSQL support, configure the database settings in the
|
||||||
|
Wiki.js admin panel after initial setup, or edit the config.yml
|
||||||
|
file directly in DATA_PATH/config/.
|
||||||
|
|
||||||
|
Backup & Restore
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Use the backup.sh and restore.sh scripts to backup and restore
|
||||||
|
your wiki data. Backups include all configuration and content.
|
||||||
|
|
||||||
|
Notes
|
||||||
|
-----
|
||||||
|
|
||||||
|
- The container runs as non-root using PUID/PGID
|
||||||
|
- Configuration changes after first run should be made through
|
||||||
|
the Wiki.js admin panel or by editing config/config.yml
|
||||||
|
- SSL/TLS should be handled by a reverse proxy (e.g., Caddy)
|
||||||
7
wikijs/_volumes.sh
Executable file
7
wikijs/_volumes.sh
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Define volume items for wikijs container
|
||||||
|
# These are used across backup, restore, create, and destroy operations
|
||||||
|
|
||||||
|
get_wikijs_volumes() {
|
||||||
|
echo "path:data:${DATA_PATH}"
|
||||||
|
}
|
||||||
18
wikijs/backup.sh
Executable file
18
wikijs/backup.sh
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# shellcheck disable=SC1091
|
||||||
|
source "${AGENT_PATH}/common.sh"
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
source "${SCRIPT_DIR}/_volumes.sh"
|
||||||
|
_check_required_env_vars "CONTAINER_NAME" "DATA_PATH"
|
||||||
|
|
||||||
|
# BACKUP SCRIPT
|
||||||
|
# Creates a backup of the Wiki.js data volume
|
||||||
|
|
||||||
|
_stop_container "$CONTAINER_NAME"
|
||||||
|
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
backup_items $(get_wikijs_volumes) || _die "Failed to create backup"
|
||||||
|
|
||||||
|
_start_container "$CONTAINER_NAME"
|
||||||
|
|
||||||
|
echo "Backup created successfully"
|
||||||
13
wikijs/config/.template_info.env
Normal file
13
wikijs/config/.template_info.env
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# DO NOT EDIT THIS FILE FOR YOUR SERVICE!
|
||||||
|
# This file is replaced from the template whenever there is an update.
|
||||||
|
# Edit the service.env file to make changes.
|
||||||
|
|
||||||
|
# Template to use - always required!
|
||||||
|
TEMPLATE=wikijs
|
||||||
|
REQUIRES_HOST_ROOT=false
|
||||||
|
REQUIRES_DOCKER=true
|
||||||
|
REQUIRES_DOCKER_ROOT=false
|
||||||
|
|
||||||
|
# Image settings
|
||||||
|
IMAGE_REGISTRY="lscr.io"
|
||||||
|
IMAGE_REPO="linuxserver/wikijs"
|
||||||
18
wikijs/config/service.env
Normal file
18
wikijs/config/service.env
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# Service settings specific to this server
|
||||||
|
# (can also override anything in the .template_info.env file in the template to make it specific to this server)
|
||||||
|
CONTAINER_NAME=wikijs
|
||||||
|
IMAGE_TAG="latest"
|
||||||
|
|
||||||
|
# Server Settings
|
||||||
|
SSH_USER="root"
|
||||||
|
|
||||||
|
# Data path on host for persistent storage
|
||||||
|
DATA_PATH="/home/dropshell/wikijs"
|
||||||
|
|
||||||
|
# Wiki.js port (web interface)
|
||||||
|
HTTP_PORT=3080
|
||||||
|
|
||||||
|
# LinuxServer.io environment variables
|
||||||
|
PUID=1000
|
||||||
|
PGID=1000
|
||||||
|
TZ="Etc/UTC"
|
||||||
20
wikijs/destroy.sh
Executable file
20
wikijs/destroy.sh
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# shellcheck disable=SC1091
|
||||||
|
source "${AGENT_PATH}/common.sh"
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
source "${SCRIPT_DIR}/_volumes.sh"
|
||||||
|
_check_required_env_vars "CONTAINER_NAME" "DATA_PATH"
|
||||||
|
|
||||||
|
# DESTROY SCRIPT
|
||||||
|
# Completely removes the service AND all data
|
||||||
|
# WARNING: This is irreversible!
|
||||||
|
|
||||||
|
echo "WARNING: This will PERMANENTLY DELETE all data for ${CONTAINER_NAME}"
|
||||||
|
echo "This includes all wiki pages, users, and configuration!"
|
||||||
|
|
||||||
|
./uninstall.sh
|
||||||
|
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
destroy_items $(get_wikijs_volumes) || _die "Failed to destroy docker volumes"
|
||||||
|
|
||||||
|
echo "Destroyed ${CONTAINER_NAME} and all data."
|
||||||
19
wikijs/install.sh
Executable file
19
wikijs/install.sh
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# shellcheck disable=SC1091
|
||||||
|
source "${AGENT_PATH}/common.sh"
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
source "${SCRIPT_DIR}/_volumes.sh"
|
||||||
|
_check_required_env_vars "CONTAINER_NAME" "IMAGE_REGISTRY" "IMAGE_REPO" "IMAGE_TAG" "DATA_PATH"
|
||||||
|
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
create_items $(get_wikijs_volumes) || _die "Failed to create data directory $DATA_PATH"
|
||||||
|
|
||||||
|
_check_docker_installed || _die "Docker test failed, aborting installation..."
|
||||||
|
|
||||||
|
docker pull "$IMAGE_REGISTRY/$IMAGE_REPO:$IMAGE_TAG" || _die "Failed to pull image $IMAGE_REGISTRY/$IMAGE_REPO:$IMAGE_TAG"
|
||||||
|
|
||||||
|
bash ./stop.sh || _die "Failed to stop container ${CONTAINER_NAME}"
|
||||||
|
_remove_container "$CONTAINER_NAME" || _die "Failed to remove container ${CONTAINER_NAME}"
|
||||||
|
bash ./start.sh || _die "Failed to start container ${CONTAINER_NAME}"
|
||||||
|
|
||||||
|
echo "Installation of ${CONTAINER_NAME} complete"
|
||||||
11
wikijs/logs.sh
Executable file
11
wikijs/logs.sh
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
source "${AGENT_PATH}/common.sh"
|
||||||
|
_check_required_env_vars "CONTAINER_NAME"
|
||||||
|
|
||||||
|
# LOGS SCRIPT
|
||||||
|
# Shows the container logs
|
||||||
|
|
||||||
|
echo "Container ${CONTAINER_NAME} logs:"
|
||||||
|
_grey_start
|
||||||
|
docker logs "${CONTAINER_NAME}" "$@"
|
||||||
|
_grey_end
|
||||||
8
wikijs/ports.sh
Executable file
8
wikijs/ports.sh
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
source "${AGENT_PATH}/common.sh"
|
||||||
|
_check_required_env_vars "HTTP_PORT"
|
||||||
|
|
||||||
|
# PORTS SCRIPT
|
||||||
|
# Lists the exposed ports
|
||||||
|
|
||||||
|
echo "$HTTP_PORT"
|
||||||
21
wikijs/restore.sh
Executable file
21
wikijs/restore.sh
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# shellcheck disable=SC1091
|
||||||
|
source "${AGENT_PATH}/common.sh"
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
source "${SCRIPT_DIR}/_volumes.sh"
|
||||||
|
_check_required_env_vars "CONTAINER_NAME" "DATA_PATH"
|
||||||
|
|
||||||
|
# RESTORE SCRIPT
|
||||||
|
# Restores Wiki.js data from a backup
|
||||||
|
|
||||||
|
# Uninstall container before restore
|
||||||
|
./uninstall.sh || _die "Failed to uninstall service before restore"
|
||||||
|
|
||||||
|
# Restore data from backup file
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
restore_items $(get_wikijs_volumes) || _die "Failed to restore data from backup file"
|
||||||
|
|
||||||
|
# Reinstall service
|
||||||
|
./install.sh || _die "Failed to reinstall service after restore"
|
||||||
|
|
||||||
|
echo "Restore complete! Service is running again."
|
||||||
8
wikijs/ssh.sh
Executable file
8
wikijs/ssh.sh
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
source "${AGENT_PATH}/common.sh"
|
||||||
|
_check_required_env_vars "CONTAINER_NAME"
|
||||||
|
|
||||||
|
# SSH SCRIPT
|
||||||
|
# Opens a shell inside the container
|
||||||
|
|
||||||
|
docker exec -it "${CONTAINER_NAME}" /bin/bash
|
||||||
30
wikijs/start.sh
Executable file
30
wikijs/start.sh
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
source "${AGENT_PATH}/common.sh"
|
||||||
|
_check_required_env_vars "CONTAINER_NAME" "IMAGE_REGISTRY" "IMAGE_REPO" "IMAGE_TAG" "DATA_PATH" "HTTP_PORT" "PUID" "PGID" "TZ"
|
||||||
|
|
||||||
|
# START SCRIPT
|
||||||
|
# The start script is required for all templates.
|
||||||
|
# It is used to start the service on the server.
|
||||||
|
|
||||||
|
DOCKER_RUN_CMD="docker run -d \
|
||||||
|
--restart unless-stopped \
|
||||||
|
--name ${CONTAINER_NAME} \
|
||||||
|
-p ${HTTP_PORT}:3000 \
|
||||||
|
-v ${DATA_PATH}/config:/config \
|
||||||
|
-v ${DATA_PATH}/data:/data \
|
||||||
|
-e PUID=${PUID} \
|
||||||
|
-e PGID=${PGID} \
|
||||||
|
-e TZ=${TZ} \
|
||||||
|
${IMAGE_REGISTRY}/${IMAGE_REPO}:${IMAGE_TAG}"
|
||||||
|
|
||||||
|
if ! _create_and_start_container "$DOCKER_RUN_CMD" "$CONTAINER_NAME"; then
|
||||||
|
_die "Failed to start container ${CONTAINER_NAME}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if the container is running
|
||||||
|
if ! _is_container_running "$CONTAINER_NAME"; then
|
||||||
|
_die "Container ${CONTAINER_NAME} is not running"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Container ${CONTAINER_NAME} started"
|
||||||
|
echo "Access Wiki.js at http://localhost:${HTTP_PORT}"
|
||||||
31
wikijs/status.sh
Executable file
31
wikijs/status.sh
Executable file
@@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
source "${AGENT_PATH}/common.sh"
|
||||||
|
_check_required_env_vars "CONTAINER_NAME"
|
||||||
|
|
||||||
|
# STATUS SCRIPT
|
||||||
|
# The status script is REQUIRED.
|
||||||
|
# It is used to return the status of the service.
|
||||||
|
# Must output exactly one of: Running, Stopped, Error, Unknown
|
||||||
|
|
||||||
|
# Check if container exists
|
||||||
|
if ! docker ps -a --format "{{.Names}}" | grep -q "^${CONTAINER_NAME}$"; then
|
||||||
|
echo "Unknown"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check container state
|
||||||
|
STATE=$(docker inspect -f '{{.State.Status}}' "$CONTAINER_NAME" 2>/dev/null)
|
||||||
|
case "$STATE" in
|
||||||
|
running)
|
||||||
|
echo "Running"
|
||||||
|
;;
|
||||||
|
exited|stopped)
|
||||||
|
echo "Stopped"
|
||||||
|
;;
|
||||||
|
restarting|paused)
|
||||||
|
echo "Error"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unknown"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
11
wikijs/stop.sh
Executable file
11
wikijs/stop.sh
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
source "${AGENT_PATH}/common.sh"
|
||||||
|
_check_required_env_vars "CONTAINER_NAME"
|
||||||
|
|
||||||
|
# STOP SCRIPT
|
||||||
|
# The stop script is required for all templates.
|
||||||
|
# It is used to stop the service on the server.
|
||||||
|
|
||||||
|
_stop_container $CONTAINER_NAME || _die "Failed to stop container ${CONTAINER_NAME}"
|
||||||
|
|
||||||
|
echo "Container ${CONTAINER_NAME} stopped"
|
||||||
18
wikijs/uninstall.sh
Executable file
18
wikijs/uninstall.sh
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
source "${AGENT_PATH}/common.sh"
|
||||||
|
_check_required_env_vars "CONTAINER_NAME" "IMAGE_REGISTRY" "IMAGE_REPO" "IMAGE_TAG"
|
||||||
|
|
||||||
|
# UNINSTALL SCRIPT
|
||||||
|
# The uninstall script is required for all templates.
|
||||||
|
# It is used to uninstall the service from the server.
|
||||||
|
# IMPORTANT: This script MUST preserve data volumes!
|
||||||
|
|
||||||
|
_remove_container "$CONTAINER_NAME" || _die "Failed to remove container ${CONTAINER_NAME}"
|
||||||
|
_is_container_running "$CONTAINER_NAME" && _die "Couldn't stop existing container"
|
||||||
|
_is_container_exists "$CONTAINER_NAME" && _die "Couldn't remove existing container"
|
||||||
|
|
||||||
|
# Remove the image
|
||||||
|
docker rmi "$IMAGE_REGISTRY/$IMAGE_REPO:$IMAGE_TAG" || echo "Failed to remove image $IMAGE_REGISTRY/$IMAGE_REPO:$IMAGE_TAG"
|
||||||
|
|
||||||
|
echo "Uninstallation of ${CONTAINER_NAME} complete."
|
||||||
|
echo "Data volume preserved. To remove all data, use destroy.sh"
|
||||||
Reference in New Issue
Block a user