Initial commit with kopia app working

This commit is contained in:
cody conder
2025-11-08 00:18:25 -06:00
commit 801174585b
34 changed files with 1380 additions and 0 deletions

45
.github/workflows/renovate.yml vendored Normal file
View File

@@ -0,0 +1,45 @@
name: Renovate
on:
workflow_dispatch:
inputs:
log_level:
type: choice
description: Log level
default: INFO
options:
- DEBUG
- INFO
- WARN
- ERROR
- FATAL
schedule:
- cron: 0 2 * * *
jobs:
renovate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install bun
uses: oven-sh/setup-bun@v2
- name: Cache Bun global packages
uses: actions/cache@v4
with:
path: ~/.bun/install/global
key: ${{ runner.os }}-bun-global-renovate-40
restore-keys: |
${{ runner.os }}-bun-global-
- name: Install Renovate
run: bun install -g renovate@40
- name: Run renovate
run: LOG_LEVEL=${{ github.event.inputs.log_level || 'INFO' }} renovate --token ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }}

23
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install
- name: Run tests
run: bun test

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
node_modules/

13
LICENSE Normal file
View File

@@ -0,0 +1,13 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.

31
README.md Normal file
View File

@@ -0,0 +1,31 @@
# Example App Store Template
This repository serves as a template for creating your own custom app store for the Runtipi platform. Use this as a starting point to create and share your own collection of applications.
## Repository Structure
- **apps/**: Contains individual app directories
- Each app has its own folder (e.g., `whoami/`) with the following structure:
- `config.json`: App configuration file
- `docker-compose.json`: Docker setup for the app
- `metadata/`: Contains app visuals and descriptions
- `description.md`: Markdown description of the app
- `logo.jpg`: App logo image
- **tests/**: Contains test files for the app store
- `apps.test.ts`: Test suite for validating apps
## Getting Started
This repository is intended to serve as a template for creating your own app store. Follow these steps to get started:
1. Click the "Use this template" button to create a new repository based on this template
2. Customize the apps or add your own app folders in the `apps/` directory
3. Test your app store by using it with Runtipi
## Documentation
For detailed instructions on creating your own app store, please refer to the official guide:
[Create Your Own App Store Guide](https://runtipi.io/docs/guides/create-your-own-app-store)

77
__tests__/apps.test.ts Normal file
View File

@@ -0,0 +1,77 @@
import { expect, test, describe } from "bun:test";
import { appInfoSchema, dynamicComposeSchema } from '@runtipi/common/schemas'
import { fromError } from 'zod-validation-error';
import fs from 'node:fs'
import path from 'node:path'
const getApps = async () => {
const appsDir = await fs.promises.readdir(path.join(process.cwd(), 'apps'))
const appDirs = appsDir.filter((app) => {
const stat = fs.statSync(path.join(process.cwd(), 'apps', app))
return stat.isDirectory()
})
return appDirs
};
const getFile = async (app: string, file: string) => {
const filePath = path.join(process.cwd(), 'apps', app, file)
try {
const file = await fs.promises.readFile(filePath, 'utf-8')
return file
} catch (err) {
return null
}
}
describe("each app should have the required files", async () => {
const apps = await getApps()
for (const app of apps) {
const files = ['config.json', 'docker-compose.json', 'metadata/logo.jpg', 'metadata/description.md']
for (const file of files) {
test(`app ${app} should have ${file}`, async () => {
const fileContent = await getFile(app, file)
expect(fileContent).not.toBeNull()
})
}
}
})
describe("each app should have a valid config.json", async () => {
const apps = await getApps()
for (const app of apps) {
test(`app ${app} should have a valid config.json`, async () => {
const fileContent = await getFile(app, 'config.json')
const parsed = appInfoSchema.omit({ urn: true }).safeParse(JSON.parse(fileContent || '{}'))
if (!parsed.success) {
const validationError = fromError(parsed.error);
console.error(`Error parsing config.json for app ${app}:`, validationError.toString());
}
expect(parsed.success).toBe(true)
})
}
})
describe("each app should have a valid docker-compose.json", async () => {
const apps = await getApps()
for (const app of apps) {
test(`app ${app} should have a valid docker-compose.json`, async () => {
const fileContent = await getFile(app, 'docker-compose.json')
const parsed = dynamicComposeSchema.safeParse(JSON.parse(fileContent || '{}'))
if (!parsed.success) {
const validationError = fromError(parsed.error);
console.error(`Error parsing docker-compose.json for app ${app}:`, validationError.toString());
}
expect(parsed.success).toBe(true)
})
}
});

37
apps/kopia/config.json Normal file
View File

@@ -0,0 +1,37 @@
{
"name": "kopia",
"min_tipi_version": "4.5.0",
"available": true,
"port": 51515,
"exposable": true,
"dynamic_config": true,
"id": "kopia",
"description": "",
"tipi_version": 2,
"version": "20251023.0.52914",
"categories": ["utilities"],
"short_desc": "",
"author": "kopia",
"dynamic":true,
"source": "https://github.com/kopia/kopia",
"website": "https://kopia.io",
"form_fields": [
{"type":"text",
"label":"username",
"required":true,
"env_variable":"USER"},
{"type":"text",
"label":"TZ",
"required":false,
"env_variable":"TZ"},
{"type":"password",
"label":"Password",
"required":true,
"env_variable":"PASSWORD"},
{"type":"text",
"label":"FingerPrint",
"required":false,
"env_variable":"KOPIA_SERVER_FINGERPRINT"}
],
"supported_architectures": ["amd64"]
}

View File

@@ -0,0 +1,112 @@
{
"schemaVersion": 2,
"services": [
{
"name": "kopia",
"image": "kopia/kopia:latest",
"command": [
"server",
"start",
"--disable-csrf-token-checks",
"--tls-cert-file=/app/certs/my.cert",
"--tls-key-file=/app/certs/my.key",
"--address=0.0.0.0:51515",
"--server-username=${USER}",
"--server-password=${PASSWORD}"
],
"environment": [
{
"key": "KOPIA_PASSWORD",
"value": "${PASSWORD}"
},
{
"key": "KOPIA_SERVER_FINGERPRINT",
"value": "${KOPIA_SERVER_FINGERPRINT}"
},
{
"key": "TZ",
"value": "${TZ}"
},
{
"key": "USER",
"value": "${USER}"
}
],
"addPorts": [
{"containerPort":51515,
"hostPort":"$APP_PORT",
"tcp":true,
"udp":false}
],
"volumes": [
{
"hostPath": "/home/${USER}/kopia/certs",
"containerPath": "/app/certs",
"readOnly": false,
"shared": false,
"private": false
},
{
"hostPath": "/home/${USER}/kopia/config",
"containerPath": "/app/config",
"readOnly": false,
"shared": false,
"private": false
},
{
"hostPath": "/home/${USER}/kopia/cache",
"containerPath": "/app/cache",
"readOnly": false,
"shared": false,
"private": false
},
{
"hostPath": "/home/${USER}/kopia/logs",
"containerPath": "/app/logs",
"readOnly": false,
"shared": false,
"private": false
},
{
"hostPath": "/mnt/Backups/Kopia",
"containerPath": "/repository",
"readOnly": false,
"shared": false,
"private": false
},
{
"hostPath": "/home/${USER}",
"containerPath": "/data/${USER}",
"readOnly": true,
"shared": false,
"private": false
},
{
"hostPath": "/mnt/ext",
"containerPath": "/data/ext",
"readOnly": true,
"shared": false,
"private": false
},
{
"hostPath": "/media/Cinema",
"containerPath": "/data/Cinema",
"readOnly": true,
"shared": false,
"private": false
}
],
"hostname": "kopia-server",
"devices": [
"/dev/fuse:/dev/fuse:rwm"
],
"privileged": true,
"capAdd": [
"SYS_ADMIN"
],
"securityOpt": [
"apparmor:unconfined"
]
}
]
}

View File

@@ -0,0 +1,43 @@
{
"name": "Minio",
"available": true,
"exposable": true,
"dynamic_config": true,
"port": 8001,
"id": "minio",
"description": "MinIO is a high-performance, S3 compatible object store. It is built for large scale AI/ML, data lake and database workloads.",
"tipi_version": 5,
"version": "RELEASE.2025-02-07T23-21-09Z",
"categories": ["development"],
"short_desc": "High Performance Object Storage.",
"author": "MinIO, Inc",
"source": "https://github.com/minio/minio",
"website": "https://min.io",
"form_fields": [
{
"type": "text",
"label": "Minio root username",
"required": true,
"env_variable": "MINIO_ROOT_USER"
},
{
"type": "password",
"label": "Minio root password",
"required": true,
"min": 8,
"env_variable": "MINIO_ROOT_PASSWORD"
},
{
"type": "text",
"label": "Minio S3 API URL (when exposed)",
"placeholder": "s3.example.com",
"required": false,
"env_variable": "MINIO_API_URL"
}
],
"supported_architectures": ["arm64", "amd64"],
"created_at": 1691943801422,
"updated_at": 1742038537982,
"$schema": "../app-info-schema.json",
"force_pull": false
}

View File

@@ -0,0 +1,50 @@
{
"$schema": "https://schemas.runtipi.io/dynamic-compose.json",
"services": [
{
"name": "minio",
"image": "minio/minio:RELEASE.2025-02-07T23-21-09Z",
"isMain": true,
"internalPort": 9001,
"addPorts": [
{
"hostPort": 8000,
"containerPort": 9000
}
],
"environment": {
"MINIO_ROOT_USER": "${MINIO_ROOT_USER}",
"MINIO_ROOT_PASSWORD": "${MINIO_ROOT_PASSWORD}",
"MINIO_BROWSER_REDIRECT_URL": "${APP_PROTOCOL:-http}://${APP_DOMAIN}",
"MINIO_DOMAIN": "${APP_DOMAIN}"
},
"volumes": [
{
"hostPath": "${APP_DATA_DIR}/data/minio/data",
"containerPath": "/data"
}
],
"command": "server --console-address :9001 /data",
"extraLabels": {
"traefik.http.middlewares.{{RUNTIPI_APP_ID}}-api-web-redirect.redirectscheme.scheme": "https",
"traefik.http.services.{{RUNTIPI_APP_ID}}-api.loadbalancer.server.port": "9000",
"traefik.http.routers.{{RUNTIPI_APP_ID}}-api-insecure.rule": "Host(`${MINIO_API_URL}`)",
"traefik.http.routers.{{RUNTIPI_APP_ID}}-api-insecure.entrypoints": "web",
"traefik.http.routers.{{RUNTIPI_APP_ID}}-api-insecure.service": "{{RUNTIPI_APP_ID}}-api",
"traefik.http.routers.{{RUNTIPI_APP_ID}}-api-insecure.middlewares": "{{RUNTIPI_APP_ID}}-api-web-redirect",
"traefik.http.routers.{{RUNTIPI_APP_ID}}-api.rule": "Host(`${MINIO_API_URL}`)",
"traefik.http.routers.{{RUNTIPI_APP_ID}}-api.entrypoints": "websecure",
"traefik.http.routers.{{RUNTIPI_APP_ID}}-api.service": "{{RUNTIPI_APP_ID}}-api",
"traefik.http.routers.{{RUNTIPI_APP_ID}}-api.tls.certresolver": "myresolver",
"traefik.http.routers.{{RUNTIPI_APP_ID}}-api-local-insecure.rule": "Host(`{{RUNTIPI_APP_ID}}-api.${LOCAL_DOMAIN}`)",
"traefik.http.routers.{{RUNTIPI_APP_ID}}-api-local-insecure.entrypoints": "web",
"traefik.http.routers.{{RUNTIPI_APP_ID}}-api-local-insecure.service": "{{RUNTIPI_APP_ID}}-api",
"traefik.http.routers.{{RUNTIPI_APP_ID}}-api-local-insecure.middlewares": "{{RUNTIPI_APP_ID}}-api-web-redirect",
"traefik.http.routers.{{RUNTIPI_APP_ID}}-api-local.rule": "Host(`{{RUNTIPI_APP_ID}}-api.${LOCAL_DOMAIN}`)",
"traefik.http.routers.{{RUNTIPI_APP_ID}}-api-local.entrypoints": "websecure",
"traefik.http.routers.{{RUNTIPI_APP_ID}}-api-local.service": "{{RUNTIPI_APP_ID}}-api",
"traefik.http.routers.{{RUNTIPI_APP_ID}}-api-local.tls": "true"
}
}
]
}

View File

@@ -0,0 +1,69 @@
services:
minio:
container_name: minio
image: minio/minio:RELEASE.2025-02-07T23-21-09Z
restart: unless-stopped
environment:
- MINIO_ROOT_USER=${MINIO_ROOT_USER}
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}
- MINIO_BROWSER_REDIRECT_URL=${APP_PROTOCOL:-http}://${APP_DOMAIN}
- MINIO_DOMAIN=${APP_DOMAIN}
ports:
- 8000:9000
- ${APP_PORT}:9001
volumes:
- ${APP_DATA_DIR}/data/minio/data:/data
networks:
- tipi_main_network
command: "server --console-address :9001 /data"
labels:
# Main
traefik.enable: true
# Console
traefik.http.middlewares.minio-console-web-redirect.redirectscheme.scheme: https
traefik.http.services.minio-console.loadbalancer.server.port: 9001
# API
traefik.http.middlewares.minio-api-web-redirect.redirectscheme.scheme: https
traefik.http.services.minio-api.loadbalancer.server.port: 9000
# Web - Console
traefik.http.routers.minio-console-insecure.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.minio-console-insecure.entrypoints: web
traefik.http.routers.minio-console-insecure.service: minio-console
traefik.http.routers.minio-console-insecure.middlewares: minio-console-web-redirect
# Web - API
traefik.http.routers.minio-api-insecure.rule: Host(`${MINIO_API_URL}`)
traefik.http.routers.minio-api-insecure.entrypoints: web
traefik.http.routers.minio-api-insecure.service: minio-api
traefik.http.routers.minio-api-insecure.middlewares: minio-api-web-redirect
# Websecure - Console
traefik.http.routers.minio-console.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.minio-console.entrypoints: websecure
traefik.http.routers.minio-console.service: minio-console
traefik.http.routers.minio-console.tls.certresolver: myresolver
# Websecure - API
traefik.http.routers.minio-api.rule: Host(`${MINIO_API_URL}`)
traefik.http.routers.minio-api.entrypoints: websecure
traefik.http.routers.minio-api.service: minio-api
traefik.http.routers.minio-api.tls.certresolver: myresolver
# Local domain - Console
traefik.http.routers.minio-console-local-insecure.rule: Host(`minio.${LOCAL_DOMAIN}`)
traefik.http.routers.minio-console-local-insecure.entrypoints: web
traefik.http.routers.minio-console-local-insecure.service: minio-console
traefik.http.routers.minio-console-local-insecure.middlewares: minio-console-web-redirect
# Local domain - API
traefik.http.routers.minio-api-local-insecure.rule: Host(`minio-api.${LOCAL_DOMAIN}`)
traefik.http.routers.minio-api-local-insecure.entrypoints: web
traefik.http.routers.minio-api-local-insecure.service: minio-api
traefik.http.routers.minio-api-local-insecure.middlewares: minio-api-web-redirect
# Local domain secure - Console
traefik.http.routers.minio-console-local.rule: Host(`minio.${LOCAL_DOMAIN}`)
traefik.http.routers.minio-console-local.entrypoints: websecure
traefik.http.routers.minio-console-local.service: minio-console
traefik.http.routers.minio-console-local.tls: true
# Local domain secure - API
traefik.http.routers.minio-api-local.rule: Host(`minio-api.${LOCAL_DOMAIN}`)
traefik.http.routers.minio-api-local.entrypoints: websecure
traefik.http.routers.minio-api-local.service: minio-api
traefik.http.routers.minio-api-local.tls: true
# Runtipi managed
runtipi.managed: true

View File

@@ -0,0 +1,28 @@
# Minio - Open Source Object Storage
Host your own Amazon S3 compatible Object Storage!
## Installation Info
This MinIO setup requires two exposed URLS
- The console URL
- The S3 API URL
While the console URL is defined by the runtipi's default expose URL you need to define the S3 API URL in the settings when installing.
**Example:**
- API: Minio S3 API URL: s3.mydomain.com
- Console: Exposed URL: minio.mydomain.com
| Exposed Service | Local Port | Exposed Domain |
| ------------------- | ---------- | ------------------ |
| Minio API | IP:8000 | s3.mydomain.com |
| Minio Admin Console | IP:8001 | minio.mydomain.com |
## About
MinIO is a High Performance Object Storage released under GNU Affero General Public License v3.0. It is API compatible with Amazon S3 cloud storage service. Use MinIO to build high performance infrastructure for machine learning, analytics and application data workloads.
See https://github.com/minio/minio for more details

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@@ -0,0 +1,38 @@
{
"$schema": "../app-info-schema.json",
"name": "Silverbullet",
"port": 8214,
"available": true,
"exposable": true,
"dynamic_config": true,
"id": "silverbullet",
"tipi_version": 24,
"version": "2.1.9",
"categories": ["utilities"],
"description": "SilverBullet aims to be your workshop for the mind",
"short_desc": "SilverBullet is a creative space where you collect, create and expand your personal knowledge, while also letting you constantly evolve the tools you use to do so.",
"author": "zefhemel",
"source": "https://github.com/silverbulletmd/silverbullet",
"website": "https://silverbullet.md",
"form_fields": [
{
"type": "text",
"label": "Username",
"max": 50,
"min": 3,
"required": true,
"env_variable": "SB_USER"
},
{
"type": "password",
"label": "Password",
"max": 50,
"min": 8,
"required": true,
"env_variable": "SB_PASSWORD"
}
],
"supported_architectures": ["arm64", "amd64"],
"created_at": 1691943801422,
"updated_at": 1760070985003
}

View File

@@ -0,0 +1,25 @@
{
"services": [
{
"name": "silverbullet",
"image": "zefhemel/silverbullet:2.1.9",
"isMain": true,
"internalPort": 3000,
"environment": {
"SB_USER": "${SB_USER}:${SB_PASSWORD}"
},
"volumes": [
{
"hostPath": "/etc/localtime",
"containerPath": "/etc/localtime",
"readOnly": true
},
{
"hostPath": "${APP_DATA_DIR}/space",
"containerPath": "/space"
}
]
}
],
"$schema": "https://schemas.runtipi.io/dynamic-compose.json"
}

View File

@@ -0,0 +1,36 @@
version: '3.9'
services:
silverbullet:
image: zefhemel/silverbullet:2.1.9
container_name: silverbullet
restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
- ${APP_DATA_DIR}/space:/space
environment:
- SB_USER=${SB_USER}:${SB_PASSWORD}
ports:
- ${APP_PORT}:3000
networks:
- tipi_main_network
labels:
traefik.enable: true
traefik.http.middlewares.silverbullet-web-redirect.redirectscheme.scheme: https
traefik.http.services.silverbullet.loadbalancer.server.port: 3000
traefik.http.routers.silverbullet-insecure.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.silverbullet-insecure.entrypoints: web
traefik.http.routers.silverbullet-insecure.service: silverbullet
traefik.http.routers.silverbullet-insecure.middlewares: silverbullet-web-redirect
traefik.http.routers.silverbullet.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.silverbullet.entrypoints: websecure
traefik.http.routers.silverbullet.service: silverbullet
traefik.http.routers.silverbullet.tls.certresolver: myresolver
traefik.http.routers.silverbullet-local-insecure.rule: Host(`silverbullet.${LOCAL_DOMAIN}`)
traefik.http.routers.silverbullet-local-insecure.entrypoints: web
traefik.http.routers.silverbullet-local-insecure.service: silverbullet
traefik.http.routers.silverbullet-local-insecure.middlewares: silverbullet-web-redirect
traefik.http.routers.silverbullet-local.rule: Host(`silverbullet.${LOCAL_DOMAIN}`)
traefik.http.routers.silverbullet-local.entrypoints: websecure
traefik.http.routers.silverbullet-local.service: silverbullet
traefik.http.routers.silverbullet-local.tls: true
runtipi.managed: true

View File

@@ -0,0 +1,22 @@
# SilverBullet
SilverBullet aims to be your **workshop for the mind**: a creative space where you collect, create and expand your personal knowledge, while also letting you constantly evolve the tools you use to do so.
While you _can_ use SilverBullet as a simple note taking application that stores notes in plain markdown files on disk, it becomes truly powerful in the hands of more technical power users. By leveraging metadata annotations, its Objects infrastructure, Live Queries and Live Templates, SilverBullet becomes a powerful _end-user programming tool_, enabling you to quickly develop various types of ad-hoc knowledge applications. SilverBullet is implemented as an open-source, self-hosted, offline-capable web application.
Youve been told there is _no such thing_ as a [silver bullet](https://en.wikipedia.org/wiki/Silver_bullet). You were told wrong.
[![Introduction to SilverBullet](http://img.youtube.com/vi/BbNbZgOwB-Y/0.jpg)](https://www.youtube.com/watch?v=BbNbZgOwB-Y)
## Features
SilverBullet...
* Runs in any modern browser (including on mobile) as a PWA in two Client Modes (_online_ and _synced_ mode), where the _synced mode_ enables **100% offline operation**, keeping a copy of content in the browser, syncing back to the server when a network connection is available.
* Provides an enjoyable markdown writing experience with a clean UI, rendering text using Live Preview, further **reducing visual noise** while still providing direct access to the underlying markdown syntax.
* Supports wiki-style **page linking** using the `[[page link]]` syntax. Incoming links are indexed and appear as “Linked Mentions” at the bottom of the pages linked to thereby providing _bi-directional linking_.
* Optimized for **keyboard-based operation**:
* Quickly navigate between pages using the **page switcher** (triggered with `Cmd-k` on Mac or `Ctrl-k` on Linux and Windows).
* Run commands via their keyboard shortcuts or the **command palette** (triggered with `Cmd-/` or `Ctrl-/` on Linux and Windows).
* Use Slash Commands to perform common text editing operations.
* Provides a platform for [end-user programming](https://www.inkandswitch.com/end-user-programming/) through its support for Objects, Live Queries and Live Templates.
* Robust extension mechanism using plugs.
* **Self-hosted**: you own your data. All content is stored as plain files in a folder on disk. Back up, sync, edit, publish, script with any additional tools you like.
* SilverBullet is [open source, MIT licensed](https://github.com/silverbulletmd/silverbullet) software.

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -0,0 +1,33 @@
{
"$schema": "../app-info-schema.json",
"name": "SiYuan",
"id": "siyuan",
"available": true,
"short_desc": "SiYuan is a privacy-first personal knowledge management system.",
"author": "siyuan-note",
"port": 6806,
"categories": ["utilities"],
"description": "SiYuan is a privacy-first personal knowledge management system, support fine-grained block-level reference and Markdown WYSIWYG.",
"tipi_version": 37,
"version": "v3.3.5",
"website": "https://b3log.org/siyuan/en/",
"source": "https://github.com/siyuan-note/siyuan",
"exposable": true,
"dynamic_config": true,
"supported_architectures": ["arm64", "amd64"],
"form_fields": [
{
"type": "password",
"label": "Access Auth Code",
"required": true,
"min": 8,
"max": 50,
"hint": "Please be sure to modify, otherwise anyone can read and write your data.",
"env_variable": "SIYUAN_ACCESS_AUTH_CODE"
}
],
"uid": 1000,
"gid": 1000,
"created_at": 1691943801422,
"updated_at": 1760565921555
}

View File

@@ -0,0 +1,23 @@
{
"$schema": "https://schemas.runtipi.io/dynamic-compose.json",
"services": [
{
"name": "siyuan",
"image": "b3log/siyuan:v3.3.5",
"isMain": true,
"internalPort": 6806,
"environment": {
"TZ": "${TZ}",
"PUID": "1000",
"PGID": "1000"
},
"volumes": [
{
"hostPath": "${APP_DATA_DIR}/data/workspace",
"containerPath": "/siyuan/workspace/"
}
],
"command": ["--workspace=/siyuan/workspace/", "--accessAuthCode=${SIYUAN_ACCESS_AUTH_CODE}"]
}
]
}

View File

@@ -0,0 +1,40 @@
services:
siyuan:
image: b3log/siyuan:v3.3.5
container_name: siyuan
command:
- '--workspace=/siyuan/workspace/'
- '--accessAuthCode=${SIYUAN_ACCESS_AUTH_CODE}'
user: '1000:1000'
restart: unless-stopped
environment:
- TZ=${TZ}
- PUID=1000
- PGID=1000
volumes:
- ${APP_DATA_DIR}/data/workspace:/siyuan/workspace/
ports:
- ${APP_PORT}:6806
networks:
- tipi_main_network
labels:
traefik.enable: true
traefik.http.middlewares.siyuan-web-redirect.redirectscheme.scheme: https
traefik.http.services.siyuan.loadbalancer.server.port: 6806
traefik.http.routers.siyuan-insecure.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.siyuan-insecure.entrypoints: web
traefik.http.routers.siyuan-insecure.service: siyuan
traefik.http.routers.siyuan-insecure.middlewares: siyuan-web-redirect
traefik.http.routers.siyuan.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.siyuan.entrypoints: websecure
traefik.http.routers.siyuan.service: siyuan
traefik.http.routers.siyuan.tls.certresolver: myresolver
traefik.http.routers.siyuan-local-insecure.rule: Host(`siyuan.${LOCAL_DOMAIN}`)
traefik.http.routers.siyuan-local-insecure.entrypoints: web
traefik.http.routers.siyuan-local-insecure.service: siyuan
traefik.http.routers.siyuan-local-insecure.middlewares: siyuan-web-redirect
traefik.http.routers.siyuan-local.rule: Host(`siyuan.${LOCAL_DOMAIN}`)
traefik.http.routers.siyuan-local.entrypoints: websecure
traefik.http.routers.siyuan-local.service: siyuan
traefik.http.routers.siyuan-local.tls: true
runtipi.managed: true

View File

@@ -0,0 +1,374 @@
> [!IMPORTANT]
> If you got `permission denied` error in `Logs` after installation
>
> You need to
> 1. Execute the following command on your server:
> `sudo chown -R 1000:1000 ~/runtipi/app-data/siyuan/data/workspace`
>
> 2. Restart SiYuan
>
> For the reason, please refer to [User Permissions](#user-permissions) section
<p align="center">
<img alt="SiYuan" src="https://b3log.org/images/brand/siyuan-128.png" alt="SiYuan Logo">
<br>
<em>Refactor your thinking</em>
<br><br>
<a title="Build Status" target="_blank" href="https://github.com/siyuan-note/siyuan/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/siyuan-note/siyuan/cd.yml?style=flat-square"></a>
<a title="Releases" target="_blank" href="https://github.com/siyuan-note/siyuan/releases"><img src="https://img.shields.io/github/release/siyuan-note/siyuan.svg?style=flat-square&color=9CF"></a>
<a title="Downloads" target="_blank" href="https://github.com/siyuan-note/siyuan/releases"><img src="https://img.shields.io/github/downloads/siyuan-note/siyuan/total.svg?style=flat-square&color=blueviolet"></a>
<br>
<a title="Docker Pulls" target="_blank" href="https://hub.docker.com/r/b3log/siyuan"><img src="https://img.shields.io/docker/pulls/b3log/siyuan.svg?style=flat-square&color=green"></a>
<a title="Docker Image Size" target="_blank" href="https://hub.docker.com/r/b3log/siyuan"><img src="https://img.shields.io/docker/image-size/b3log/siyuan.svg?style=flat-square&color=ff96b4"></a>
<a title="Hits" target="_blank" href="https://github.com/siyuan-note/siyuan"><img src="https://hits.b3log.org/siyuan-note/siyuan.svg"></a>
<br>
<a title="AGPLv3" target="_blank" href="https://www.gnu.org/licenses/agpl-3.0.txt"><img src="http://img.shields.io/badge/license-AGPLv3-orange.svg?style=flat-square"></a>
<a title="Code Size" target="_blank" href="https://github.com/siyuan-note/siyuan"><img src="https://img.shields.io/github/languages/code-size/siyuan-note/siyuan.svg?style=flat-square&color=yellow"></a>
<a title="GitHub Pull Requests" target="_blank" href="https://github.com/siyuan-note/siyuan/pulls"><img src="https://img.shields.io/github/issues-pr-closed/siyuan-note/siyuan.svg?style=flat-square&color=FF9966"></a>
<br>
<a title="GitHub Commits" target="_blank" href="https://github.com/siyuan-note/siyuan/commits/master"><img src="https://img.shields.io/github/commit-activity/m/siyuan-note/siyuan.svg?style=flat-square"></a>
<a title="Last Commit" target="_blank" href="https://github.com/siyuan-note/siyuan/commits/master"><img src="https://img.shields.io/github/last-commit/siyuan-note/siyuan.svg?style=flat-square&color=FF9900"></a>
<br><br>
<a title="Twitter" target="_blank" href="https://twitter.com/b3logos"><img alt="Twitter Follow" src="https://img.shields.io/twitter/follow/b3logos?label=Follow&style=social"></a>
<a title="Discord" target="_blank" href="https://discord.gg/dmMbCqVX7G"><img alt="Chat on Discord" src="https://img.shields.io/discord/808152298789666826?label=Discord&logo=Discord&style=social"></a>
<br><br>
<a href="https://www.producthunt.com/products/siyuan/reviews?utm_source=badge-product_rating&utm_medium=badge&utm_souce=badge-siyuan" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/product_rating.svg?product_id=534576&theme=light" alt="SiYuan - A&#0032;privacy&#0045;first&#0032;personal&#0032;knowledge&#0032;management&#0032;software | Product Hunt" style="width: 242px; height: 108px;" width="242" height="108" /></a>
</p>
<p align="center">
<a href="README_zh_CN.md">中文</a>
</p>
---
## Table of Contents
- [Table of Contents](#table-of-contents)
- [💡 Introduction](#-introduction)
- [🔮 Features](#-features)
- [🏗️ Architecture and Ecosystem](#-architecture-and-ecosystem)
- [🌟 Star History](#-star-history)
- [🗺️ Roadmap](#-roadmap)
- [🚀 Download Setup](#-download-setup)
- [App Market](#app-market)
- [Installation Package](#installation-package)
- [Docker Hosting](#docker-hosting)
- [Overview](#overview)
- [File structure](#file-structure)
- [Entrypoint](#entrypoint)
- [User permissions](#user-permissions)
- [Hidden port](#hidden-port)
- [Note](#note)
- [Limitations](#limitations)
- [Unraid Hosting](#unraid-hosting)
- [Insider Preview](#insider-preview)
- [🏘️ Community](#-community)
- [🛠️ Development Guide](#-development-guide)
- [❓ FAQ](#-faq)
- [How does SiYuan store data?](#how-does-siyuan-store-data)
- [Does it support data synchronization through a third-party sync disk?](#does-it-support-data-synchronization-through-a-third-party-sync-disk)
- [Is SiYuan open source?](#is-siyuan-open-source)
- [How to upgrade to a new version?](#how-to-upgrade-to-a-new-version)
- [What if some blocks (such as paragraph blocks in list items) cannot find the block icon?](#what-if-some-blocks-such-as-paragraph-blocks-in-list-items-cannot-find-the-block-icon)
- [What should I do if the data repo key is lost?](#what-should-i-do-if-the-data-repo-key-is-lost)
- [Do I need to pay for it?](#do-i-need-to-pay-for-it)
- [🙏 Acknowledgement](#-acknowledgement)
- [Contributors](#contributors)
---
## 💡 Introduction
SiYuan is a privacy-first personal knowledge management system, support fine-grained block-level reference and Markdown
WYSIWYG.
Welcome to [SiYuan English Discussion Forum](https://liuyun.io) to learn more.
![feature0.png](https://b3logfile.com/file/2024/01/feature0-1orBRlI.png)
![feature51.png](https://b3logfile.com/file/2024/02/feature5-1-uYYjAqy.png)
## 🔮 Features
Most features are free, even for commercial use.
* Content block
* Block-level reference and two-way links
* Custom attributes
* SQL query embed
* Protocol `siyuan://`
* Editor
* Block-style
* Markdown WYSIWYG
* List outline
* Block zoom-in
* Million-word large document editing
* Mathematical formulas, charts, flowcharts, Gantt charts, timing charts, staffs, etc.
* Web clipping
* PDF Annotation link
* Export
* Block ref and embed
* Standard Markdown with assets
* PDF, Word and HTML
* Copy to WeChat MP, Zhihu and Yuque
* Database
* Table view
* Flashcard spaced repetition
* AI writing and Q/A chat via OpenAI API
* Tesseract OCR
* Multi-tab, drag and drop to split screen
* Template snippet
* JavaScript/CSS snippet
* Android/iOS App
* Docker deployment
* [API](https://github.com/siyuan-note/siyuan/blob/master/API.md)
* Community marketplace
Some features are only available to paid members, for more details please refer to [Pricing](https://b3log.org/siyuan/en/pricing.html).
## 🏗️ Architecture and Ecosystem
![SiYuan Arch](https://b3logfile.com/file/2023/05/SiYuan_Arch-Sgu8vXT.png "SiYuan Arch")
| Project | Description | Forks | Stars |
|----------------------------------------------------------|-----------------------|---------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|
| [lute](https://github.com/88250/lute) | Editor engine | ![GitHub forks](https://img.shields.io/github/forks/88250/lute) | ![GitHub Repo stars](https://img.shields.io/github/stars/88250/lute) |
| [chrome](https://github.com/siyuan-note/siyuan-chrome) | Chrome/Edge extension | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/siyuan-chrome) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/siyuan-chrome) |
| [bazaar](https://github.com/siyuan-note/bazaar) | Community marketplace | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/bazaar) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/bazaar) |
| [dejavu](https://github.com/siyuan-note/dejavu) | Data repo | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/dejavu) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/dejavu) |
| [petal](https://github.com/siyuan-note/petal) | Plugin API | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/petal) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/petal) |
| [android](https://github.com/siyuan-note/siyuan-android) | Android App | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/siyuan-android) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/siyuan-android) |
| [ios](https://github.com/siyuan-note/siyuan-ios) | iOS App | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/siyuan-ios) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/siyuan-ios) |
| [riff](https://github.com/siyuan-note/riff) | Spaced repetition | ![GitHub forks](https://img.shields.io/github/forks/siyuan-note/riff) | ![GitHub Repo stars](https://img.shields.io/github/stars/siyuan-note/riff) |
## 🌟 Star History
[![Star History Chart](https://api.star-history.com/svg?repos=siyuan-note/siyuan&type=Date)](https://star-history.com/#siyuan-note/siyuan&Date)
## 🗺️ Roadmap
* [SiYuan development plan and progress](https://github.com/orgs/siyuan-note/projects/1)
* [SiYuan changelog](CHANGELOG.md)
## 🚀 Download Setup
It is recommended to give priority to installing through the application market on the desktop and mobile, so that you can upgrade the version with one click in the future.
### App Market
Mobile:
* [App Store](https://apps.apple.com/us/app/siyuan/id1583226508)
* [Google Play](https://play.google.com/store/apps/details?id=org.b3log.siyuan)
* [F-Droid](https://f-droid.org/packages/org.b3log.siyuan)
Desktop:
* [Microsoft Store](https://apps.microsoft.com/detail/9p7hpmxp73k4)
### Installation Package
* [B3log](https://b3log.org/siyuan/en/download.html)
* [GitHub](https://github.com/siyuan-note/siyuan/releases)
### Docker Hosting
<details>
<summary>Docker Deployment</summary>
#### Overview
The easiest way to serve SiYuan on a server is to deploy it through Docker.
* Image name `b3log/siyuan`
* [Image URL](https://hub.docker.com/r/b3log/siyuan)
#### File structure
The overall program is located under `/opt/siyuan/`, which is basically the structure under the resources folder of the Electron installation package:
* appearance: icon, theme, languages
* guide: user guide document
* stage: interface and static resources
* kernel: kernel program
#### Entrypoint
The entry point is set when building the Docker image: `ENTRYPOINT ["/opt/siyuan/kernel" ]`, use `docker run b3log/siyuan` with parameters to start:
* `--workspace`: Specifies the workspace folder path, mounted to the container via `-v` on the host
* `--accessAuthCode`: Specifies the access authorization code
More parameters can refer to `--help`. The following is an example of a startup command:
```
docker run -d -v workspace_dir_host:workspace_dir_container -p 6806:6806 b3log/siyuan --workspace=workspace_dir_container --accessAuthCode=xxx
```
* `workspace_dir_host`: The workspace folder path on the host
* `workspace_dir_container`: The path of the workspace folder in the container, which is the same as specified in `--workspace`
* `accessAuthCode`: Access authorization code, please **be sure to modify**, otherwise anyone can read and write your data
To simplify, it is recommended to configure the workspace folder path to be consistent on the host and container, such as: `workspace_dir_host` and `workspace_dir_container` are configured as `/siyuan/workspace`, the corresponding startup commands is:
```
docker run -d -v /siyuan/workspace:/siyuan/workspace -p 6806:6806 -u 1000:1000 b3log/siyuan --workspace=/siyuan/workspace/ --accessAuthCode=xxx
```
Alternatively, see below for an example Docker Compose file:
```
version: "3.9"
services:
main:
image: b3log/siyuan
command: ['--workspace=/siyuan/workspace/', '--accessAuthCode=${AuthCode}']
user: '1000:1000'
ports:
- 6806:6806
volumes:
- /siyuan/workspace:/siyuan/workspace
restart: unless-stopped
environment:
# A list of time zone identifiers can be found at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
- TZ=${TimeZone}
```
#### User permissions
In the image, the normal user `siyuan` (uid 1000/gid 1000) created by default is used to start the kernel process. Therefore, when the host creates a workspace folder, please pay attention to setting the user group of the folder: `chown -R 1000:1000 /siyuan/workspace`. The parameter `-u 1000:1000` is required when starting the container.
#### Hidden port
Use NGINX reverse proxy to hide port 6806, please note:
* Configure WebSocket reverse proxy `/ws`
#### Note
* Be sure to confirm the correctness of the mounted volume, otherwise the data will be lost after the container is deleted
* Do not use URL rewriting for redirection, otherwise there may be problems with authentication, it is recommended to configure a reverse proxy
#### Limitations
* Does not support desktop and mobile application connections, only supports use on browsers
* Export to PDF, HTML and Word formats is not supported
* Import Markdown file is not supported
</details>
### Unraid Hosting
<details>
<summary>Unraid Deployment</summary>
Note: First run `chown -R 1000:1000 /mnt/user/appdata/siyuan` in the terminal
Template reference:
```
Web UI: 6806
Container Port: 6806
Container Path: /home/siyuan
Host path: /mnt/user/appdata/siyuan
PUID: 1000
PGID: 1000
Publish parameters: --accessAuthCode=******(Access authorization code)
```
</details>
### Insider Preview
We release insider preview before major updates, please visit [https://github.com/siyuan-note/insider](https://github.com/siyuan-note/insider).
## 🏘️ Community
* [English Discussion Forum](https://liuyun.io)
* [User community summary](https://liuyun.io/article/1687779743723)
* [Awesome SiYuan](https://github.com/siyuan-note/awesome)
## 🛠️ Development Guide
See [Development Guide](https://github.com/siyuan-note/siyuan/blob/master/.github/CONTRIBUTING.md).
## ❓ FAQ
### How does SiYuan store data?
The data is saved in the workspace folder, in the workspace data folder:
* `assets` is used to save all inserted assets
* `emojis` is used to save emoji images
* `snippets` is used to save code snippets
* `storage` is used to save query conditions, layouts and flashcards, etc.
* `templates` is used to save template snippets
* `widgets` is used to save widgets
* `plugins` is used to save plugins
* `public` is used to save public data
* The rest of the folders are the notebook folders created by the user, files with the suffix of `.sy` in the notebook folder are used to save the document data, and the data format is JSON
### Does it support data synchronization through a third-party sync disk?
Data synchronization through third-party synchronization disks is not supported, otherwise data may be corrupted.
Although it does not support third-party sync disks, it supports connect with third-party cloud storage (Member's privileges).
In addition, you can also consider manually exporting and importing data to achieve data synchronization:
* Desktop: <kbd>Settings</kbd> - <kbd>Export</kbd> - <kbd>Export Data</kbd> / <kbd>Import Data</kbd>
* Mobile: <kbd>Right column</kbd> - <kbd>About</kbd> - <kbd>Export Data</kbd> / <kbd>Import Data</kbd>
### Is SiYuan open source?
SiYuan is completely open source, and contributions are welcome:
* [User Interface and Kernel](https://github.com/siyuan-note/siyuan)
* [Android](https://github.com/siyuan-note/siyuan-android)
* [iOS](https://github.com/siyuan-note/siyuan-ios)
* [Chrome Clipping Extension](https://github.com/siyuan-note/siyuan-chrome)
For more details, please refer to [Development Guide](https://github.com/siyuan-note/siyuan/blob/master/.github/CONTRIBUTING.md).
### How to upgrade to a new version?
* If installed via app store, please update via app store
* If it is installed through the installation package on the desktop, you can open the option of <kbd>Settings</kbd> - <kbd>About</kbd> - <kbd>Automatically download update installation package</kbd>, so that SiYuan will automatically download The latest version of the installation package and prompts to install
* If it is installed by manual installation package, please download the installation package again to install
You can <kbd>Check update</kbd> in <kbd>Settings</kbd> - <kbd>About</kbd> - <kbd>Current Version</kbd>, or pay attention to [Official Download](https://b3log.org/siyuan/en/download.html) or [GitHub Releases](https://github.com/siyuan-note/siyuan/releases) to get the new version.
### What if some blocks (such as paragraph blocks in list items) cannot find the block icon?
The first sub-block under the list item is the block icon omitted. You can move the cursor into this block and trigger its block menu with <kbd>Ctrl+/</kbd> .
### What should I do if the data repo key is lost?
* If the data repo key is correctly initialized on multiple devices before, the key is the same on all devices and can be set in <kbd>Settings</kbd> - <kbd>About</kbd> - <kbd>Data repo key</kbd> - <kbd>Copy key string</kbd> retrieve
* If it has not been configured correctly before (for example, the keys on multiple devices are inconsistent) or all devices are unavailable and the key string cannot be obtained, you can reset the key by following the steps below:
1. Manually back up the data, you can use <kbd>Export Data</kbd> or directly copy the <kbd>workspace/data/</kbd> folder on the file system
2. <kbd>Settings</kbd> - <kbd>About</kbd> - <kbd>Data rep key</kbd> - <kbd>Reset data repo</kbd>
3. Reinitialize the data repo key. After initializing the key on one device, other devices import the key
4. The cloud uses the new synchronization directory, the old synchronization directory is no longer available and can be deleted
5. The existing cloud snapshots are no longer available and can be deleted
### Do I need to pay for it?
Most features are free, even for commercial use.
Member's privileges can only be used after payment, please refer to [Pricing](https://b3log.org/siyuan/en/pricing.html).
## 🙏 Acknowledgement
The birth of SiYuan is inseparable from many open source projects and contributors, please refer to the project source code kernel/go.mod, app/package.json and project homepage.
The growth of SiYuan is inseparable from user feedback and promotion, thank you for everyone's help to SiYuan ❤️
### Contributors
Welcome to join us and contribute code to SiYuan together.
<a href="https://github.com/siyuan-note/siyuan/graphs/contributors">
<img src="https://contrib.rocks/image?repo=siyuan-note/siyuan" />
</a>

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

24
apps/whoami/config.json Normal file
View File

@@ -0,0 +1,24 @@
{
"name": "Whoami",
"id": "whoami",
"available": true,
"short_desc": "Tiny Go server that prints os information and HTTP request to output.",
"author": "traefik",
"port": 8382,
"categories": [
"utilities"
],
"description": "Tiny Go webserver that prints OS information and HTTP request to output.",
"tipi_version": 2,
"version": "v1.11.0",
"source": "https://github.com/traefik/whoami",
"exposable": true,
"supported_architectures": [
"arm64",
"amd64"
],
"created_at": 1745082405284,
"updated_at": 1745674974072,
"dynamic_config": true,
"form_fields": []
}

View File

@@ -0,0 +1,10 @@
{
"services": [
{
"name": "whoami",
"image": "traefik/whoami:v1.11.0",
"isMain": true,
"internalPort": "80"
}
]
}

View File

@@ -0,0 +1,34 @@
services:
whoami:
image: traefik/whoami:v1.11.0
container_name: whoami
ports:
- ${APP_PORT}:80
networks:
- tipi_main_network
labels:
# Main
traefik.enable: true
traefik.http.middlewares.whoami-web-redirect.redirectscheme.scheme: https
traefik.http.services.whoami.loadbalancer.server.port: 80
# Web
traefik.http.routers.whoami-insecure.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.whoami-insecure.entrypoints: web
traefik.http.routers.whoami-insecure.service: whoami
traefik.http.routers.whoami-insecure.middlewares: whoami-web-redirect
# Websecure
traefik.http.routers.whoami.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.whoami.entrypoints: websecure
traefik.http.routers.whoami.service: whoami
traefik.http.routers.whoami.tls.certresolver: myresolver
# Local domain
traefik.http.routers.whoami-local-insecure.rule: Host(`whoami.${LOCAL_DOMAIN}`)
traefik.http.routers.whoami-local-insecure.entrypoints: web
traefik.http.routers.whoami-local-insecure.service: whoami
traefik.http.routers.whoami-local-insecure.middlewares: whoami-web-redirect
# Local domain secure
traefik.http.routers.whoami-local.rule: Host(`whoami.${LOCAL_DOMAIN}`)
traefik.http.routers.whoami-local.entrypoints: websecure
traefik.http.routers.whoami-local.service: whoami
traefik.http.routers.whoami-local.tls: true
runtipi.managed: true

View File

@@ -0,0 +1,43 @@
# Whoami
Tiny Go webserver that prints OS information and HTTP request to output.
## Usage
### Paths
#### `/[?wait=d]`
Returns the whoami information (request and network information).
The optional `wait` query parameter can be provided to tell the server to wait before sending the response.
The duration is expected in Go's [`time.Duration`](https://golang.org/pkg/time/#ParseDuration) format (e.g. `/?wait=100ms` to wait 100 milliseconds).
The optional `env` query parameter can be set to `true` to add the environment variables to the response.
#### `/api`
Returns the whoami information (and some extra information) as JSON.
The optional `env` query parameter can be set to `true` to add the environment variables to the response.
#### `/bench`
Always return the same response (`1`).
#### `/data?size=n[&unit=u]`
Creates a response with a size `n`.
The unit of measure, if specified, accepts the following values: `KB`, `MB`, `GB`, `TB` (optional, default: bytes).
#### `/echo`
WebSocket echo.
#### `/health`
Heath check.
- `GET`, `HEAD`, ...: returns a response with the status code defined by the `POST`
- `POST`: changes the status code of the `GET` (`HEAD`, ...) response.

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
bun.lockb Executable file

Binary file not shown.

3
config.js Normal file
View File

@@ -0,0 +1,3 @@
export default {
allowedCommands: ["bun ./scripts/update-config.ts", "bun install && bun run test"],
};

25
package.json Normal file
View File

@@ -0,0 +1,25 @@
{
"name": "example-appstore",
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"scripts": {
"test": "bun test"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@types/bun": "latest",
"@types/node": "^22.14.1"
},
"dependencies": {
"@runtipi/common": "^0.8.0",
"bun": "^1.2.10",
"zod-validation-error": "^3.4.0"
},
"peerDependencies": {
"typescript": "^5.0.0"
}
}

62
renovate.json Normal file
View File

@@ -0,0 +1,62 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"automerge": false,
"extends": [
"config:recommended"
],
"addLabels": [
"renovate"
],
"enabledManagers": ["regex"],
"automergeStrategy": "rebase",
"customManagers": [
{
"customType": "regex",
"fileMatch": [
"^.*docker-compose\\.json$"
],
"matchStrings": [
"\"image\": \"(?<depName>.*?):(?<currentValue>.*?)\","
],
"datasourceTemplate": "docker"
}
],
"packageRules": [
{
"matchUpdateTypes": [
"minor",
"major",
"patch",
"pin",
"digest"
],
"automerge": false
},
{
"matchDepTypes": [
"devDependencies"
],
"automerge": false
},
{
"matchPackageNames": [
"mariadb",
"mysql",
"monogdb",
"postgres",
"redis"
],
"enabled": false
}
],
"postUpgradeTasks": {
"commands": [
"bun ./scripts/update-config.ts {{packageFile}} {{newVersion}}",
"bun install && bun run test"
],
"fileFilters": [
"**/*"
],
"executionMode": "update"
}
}

35
scripts/update-config.ts Normal file
View File

@@ -0,0 +1,35 @@
import path from "node:path";
import fs from "fs/promises";
const packageFile = process.argv[2];
const newVersion = process.argv[3];
type AppConfig = {
tipi_version: string;
version: string;
updated_at: number;
};
const updateAppConfig = async (packageFile: string, newVersion: string) => {
try {
const packageRoot = path.dirname(packageFile);
const configPath = path.join(packageRoot, "config.json");
const config = await fs.readFile(configPath, "utf-8");
const configParsed = JSON.parse(config) as AppConfig;
configParsed.tipi_version = configParsed.tipi_version + 1;
configParsed.version = newVersion;
configParsed.updated_at = new Date().getTime();
await fs.writeFile(configPath, JSON.stringify(configParsed, null, 2));
} catch (e) {
console.error(`Failed to update app config, error: ${e}`);
}
};
if (!packageFile || !newVersion) {
console.error("Usage: node update-config.js <packageFile> <newVersion>");
process.exit(1);
}
updateAppConfig(packageFile, newVersion);

24
tsconfig.json Normal file
View File

@@ -0,0 +1,24 @@
{
"compilerOptions": {
"esModuleInterop": true,
"skipLibCheck": true,
"target": "es2022",
"allowJs": true,
"resolveJsonModule": true,
"moduleDetection": "force",
"isolatedModules": true,
"verbatimModuleSyntax": true,
"strict": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
"module": "NodeNext",
"outDir": "dist",
"sourceMap": true,
"lib": [
"es2022"
]
},
"include": [
"**/*.ts",
],
}