Add configuration files for WebOffice services and update README

This commit is contained in:
gyurix
2025-07-17 22:55:05 +02:00
parent 833d9fd7bb
commit c762184b56
10 changed files with 670 additions and 1 deletions

View File

@@ -1,2 +1,51 @@
# format-applications
# default-applications-tree
You can add more application sections into applications-tree.json.
You have to specify the application name and version. For example:
{
"name": "nextcloud",
"version": "latest"
}
The name must be the same as the directory name of the application.
The directory of an application have to contain a template.json file and can contain more json files (service, domain, secret, etc. files).
The mandatory template.json file's structure is the following.
- "name" - the name of the application, must be the same as the directory name
- "fields" - array of used variables by service
{
"name": "vaultwarden",
"fields": [
...
]
}
An element of fields can contain the following keys.
- description - label of the field, this text will appear before element
- key - name of variable
- value - default value of variable in the form
- required - if set "true" then fill in of the field is required in the form
- type - if not set then default is text, available field types: text, password, textarea, select
- if type is "select" then options are separated by ",". Option's value and text is separated by ":", but text is not mandatory. For example:
"value": "yes,no"
"value": "1:gmail,2:microsoft outlook/hotmail,3:other",
- generated - the value of the variable is auto generated, so the field will not appear in the form. Generated examples:
"time|md5|8" - generated from time, encoded by md5 and character length is 8
"random|md5|20" - random generated number, encoded by sha256, length is 20
Field element example:
{
"description": "Please add Nextcloud password:",
"key": "NEXTCLOUD_PASSWORD",
"value": "",
"required": "true",
"type": "password"
},

9
applications-tree.json Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,60 @@
{
"main": {
"SERVICE_NAME": "weboffice",
"DOMAIN": "#DOMAIN"
},
"containers": [
{
"IMAGE": "safebox/domain-check",
"UPDATE": "true",
"MEMORY": "64M",
"NAME": "domain_checker",
"ROLES": "domain_checker",
"NETWORK": "host",
"SELECTOR": "",
"SCALE": "0",
"EXTRA": "--rm --privileged",
"PRE_START": [],
"DEPEND": [],
"POST_START": [],
"CMD": "",
"ENVS": [
{
"PROXY": "smarthostloadbalancer"
},
{
"TARGET": "webofficeapache-app"
},
{
"PORT": "80"
},
{
"DOMAIN": "#DOMAIN"
},
{
"SMARTHOST_PROXY_PATH": "/smarthost-domains"
},
{
"OPERATION": "CREATE"
}
],
"VOLUMES": [
{
"SOURCE": "/etc/user/config/smarthost-domains",
"DEST": "/smarthost-domains",
"TYPE": "rw"
},
{
"SOURCE": "/etc/system/data/dns/hosts.local",
"DEST": "/etc/dns/hosts.local",
"TYPE": "ro"
},
{
"SOURCE": "/var/run/docker.sock",
"DEST": "/var/run/docker.sock",
"TYPE": "rw"
}
]
}
]
}

View File

@@ -0,0 +1,76 @@
{
"main": {
"SERVICE_NAME": "firewalls",
"DOMAIN": "null"
},
"containers": [
{
"IMAGE": "safebox/firewall:latest",
"UPDATE": "true",
"NAME": "firewall",
"MEMORY": "64M",
"NETWORK": "host",
"SCALE": "0",
"VOLUMES": [
{
"SOURCE": "/run/",
"DEST": "/run/",
"TYPE": "rw"
},
{
"SOURCE": "/etc/user/config/services",
"DEST": "/services",
"TYPE": "ro"
},
{
"SOURCE": "/etc/system/data/dns/hosts.local",
"DEST": "/etc/dns/hosts.local",
"TYPE": "ro"
},
{
"SOURCE": "/var/run/docker.sock",
"DEST": "/var/run/docker.sock",
"TYPE": "rw"
}
],
"PORTS": [],
"READYNESS": [
{
"tcp": ""
},
{
"HTTP": ""
},
{
"EXEC": "/ready.sh"
}
],
"ENVS": [
{
"CHAIN": "DOCKER-USER"
},
{
"SOURCE": "smarthostbackend"
},
{
"TARGET": "webofficeapache-app"
},
{
"TYPE": "tcp"
},
{
"TARGET_PORT": "8080"
},
{
"COMMENT": "proxy for weboffice"
}
],
"EXTRA": "--privileged --rm",
"DEPEND": "null",
"START_ON_BOOT": "false",
"CMD": "null",
"PRE_START": "null",
"POST_START": "null"
}
]
}

View File

@@ -0,0 +1,76 @@
{
"main": {
"SERVICE_NAME": "firewalls",
"DOMAIN": "null"
},
"containers": [
{
"IMAGE": "safebox/firewall:latest",
"UPDATE": "true",
"NAME": "firewall",
"MEMORY": "64M",
"NETWORK": "host",
"SCALE": "0",
"VOLUMES": [
{
"SOURCE": "/run/",
"DEST": "/run/",
"TYPE": "rw"
},
{
"SOURCE": "/etc/user/config/services",
"DEST": "/services",
"TYPE": "ro"
},
{
"SOURCE": "/etc/system/data/dns/hosts.local",
"DEST": "/etc/dns/hosts.local",
"TYPE": "ro"
},
{
"SOURCE": "/var/run/docker.sock",
"DEST": "/var/run/docker.sock",
"TYPE": "rw"
}
],
"PORTS": [],
"READYNESS": [
{
"tcp": ""
},
{
"HTTP": ""
},
{
"EXEC": "/ready.sh"
}
],
"ENVS": [
{
"CHAIN": "DOCKER-USER"
},
{
"SOURCE": "webofficeapache-app"
},
{
"TARGET": "webofficemysql-db"
},
{
"TYPE": "tcp"
},
{
"TARGET_PORT": "3306"
},
{
"COMMENT": "weboffice to database"
}
],
"EXTRA": "--privileged --rm",
"DEPEND": "null",
"START_ON_BOOT": "false",
"CMD": "null",
"PRE_START": "null",
"POST_START": "null"
}
]
}

View File

@@ -0,0 +1,76 @@
{
"main": {
"SERVICE_NAME": "firewalls",
"DOMAIN": "null"
},
"containers": [
{
"IMAGE": "safebox/firewall:latest",
"UDAPE": "true",
"NAME": "firewall",
"MEMORY": "64M",
"NETWORK": "host",
"SCALE": "0",
"VOLUMES": [
{
"SOURCE": "/run/",
"DEST": "/run/",
"TYPE": "rw"
},
{
"SOURCE": "/etc/user/config/services",
"DEST": "/services",
"TYPE": "ro"
},
{
"SOURCE": "/etc/system/data/dns/hosts.local",
"DEST": "/etc/dns/hosts.local",
"TYPE": "ro"
},
{
"SOURCE": "/var/run/docker.sock",
"DEST": "/var/run/docker.sock",
"TYPE": "rw"
}
],
"PORTS": [],
"READYNESS": [
{
"tcp": ""
},
{
"HTTP": ""
},
{
"EXEC": "/ready.sh"
}
],
"ENVS": [
{
"CHAIN": "DOCKER-USER"
},
{
"SOURCE": "webofficeapache-app"
},
{
"TARGET": "coredns"
},
{
"TYPE": "udp"
},
{
"TARGET_PORT": "53"
},
{
"COMMENT": "weboffice access for local dns"
}
],
"EXTRA": "--privileged --rm",
"DEPEND": "null",
"START_ON_BOOT": "false",
"CMD": "",
"PRE_START": [],
"POST_START": []
}
]
}

View File

@@ -0,0 +1,76 @@
{
"main": {
"SERVICE_NAME": "firewalls",
"DOMAIN": "null"
},
"containers": [
{
"IMAGE": "safebox/firewall:latest",
"UPDATE": "true",
"NAME": "firewall",
"MEMORY": "64M",
"NETWORK": "host",
"SCALE": "0",
"VOLUMES": [
{
"SOURCE": "/run/",
"DEST": "/run/",
"TYPE": "rw"
},
{
"SOURCE": "/etc/user/config/services",
"DEST": "/services",
"TYPE": "ro"
},
{
"SOURCE": "/etc/system/data/dns/hosts.local",
"DEST": "/etc/dns/hosts.local",
"TYPE": "ro"
},
{
"SOURCE": "/var/run/docker.sock",
"DEST": "/var/run/docker.sock",
"TYPE": "rw"
}
],
"PORTS": [],
"READYNESS": [
{
"tcp": ""
},
{
"HTTP": ""
},
{
"EXEC": "/ready.sh"
}
],
"ENVS": [
{
"CHAIN": "DOCKER-USER"
},
{
"SOURCE": "webofficeapache-app"
},
{
"TARGET": "webofficewebdav-app"
},
{
"TYPE": "tcp"
},
{
"TARGET_PORT": "8009"
},
{
"COMMENT": "weboffice to database"
}
],
"EXTRA": "--privileged --rm",
"DEPEND": "null",
"START_ON_BOOT": "false",
"CMD": "null",
"PRE_START": "null",
"POST_START": "null"
}
]
}

View File

@@ -0,0 +1,147 @@
{
"main": {
"SERVICE_NAME": "weboffice",
"DOMAIN": "#DOMAIN"
},
"containers": [
{
"IMAGE": "alpine:latest",
"UPDATE": "true",
"NAME": "weboffice-init",
"NETWORK": "host",
"MEMORY": "64M",
"VOLUMES": [
{
"SOURCE": "USER_DATA",
"DEST": "/etc/user/data",
"TYPE": "rw"
},
{
"SOURCE": "SYSTEM_DATA",
"DEST": "/etc/system/data",
"TYPE": "rw"
},
{
"SOURCE": "SYSTEM_LOG",
"DEST": "/etc/system/log",
"TYPE": "rw"
}
],
"EXTRA": "--rm",
"DEPEND": "null",
"START_ON_BOOT": "false",
"ENTRYPOINT": "sh -c",
"CMD": "mkdir -p /etc/user/data/weboffice/db mkdir -p /etc/user/data/weboffice/upload && mkdir -p /etc/system/log/weboffice/db",
"PRE_START": "null",
"POST_START": "null"
},
{
"IMAGE": "mariadb:11.4",
"NAME": "webofficemysql-db",
"MEMORY": "512M",
"NETWORK": "weboffice-net",
"SELECTOR": "weboffice-db",
"VOLUMES": [
{
"SOURCE": "/etc/user/data/weboffice/upload",
"DEST": "/tmp/mysql",
"TYPE": "rw"
},
{
"SOURCE": "/etc/user/data/weboffice/db",
"DEST": "/var/lib/mysql",
"TYPE": "rw"
},
{
"SOURCE": "/etc/system/log/weboffice/db",
"DEST": "/var/lib/mysql/mysql-bin",
"TYPE": "rw"
}
],
"PORTS": [
{
"SOURCE": "null",
"DEST": "3306",
"TYPE": "tcp"
}
],
"ENV_FILES": [
"/etc/user/secret/weboffice/weboffice.json"
],
"EXTRA": "--restart always",
"DEPEND": "null",
"START_ON_BOOT": "false",
"CMD": "null",
"PRE_START": "null",
"POST_START": "null"
},
{
"IMAGE": "registry.dev.format.hu/weboffice:5.6",
"NAME": "webofficeapache-app",
"MEMORY": "512M",
"NETWORK": "weboffice-net",
"SELECTOR": "webofficeapache-app",
"DNS": [
"core-dns"
],
"VOLUMES": [
{
"SOURCE": "/etc/user/data/weboffice/upload",
"DEST": "/var/www/weboffice/upload",
"TYPE": "rw"
}
],
"PORTS": [
{
"SOURCE": "null",
"DEST": "8080",
"TYPE": "tcp"
}
],
"ENV_FILES": [
"/etc/user/secret/weboffice/weboffice.json"
],
"EXTRA": "--restart always",
"DEPEND": "null",
"START_ON_BOOT": "false",
"CMD": "null",
"PRE_START": "null",
"POST_START": [
"firewall-weboffice-dns",
"firewall-weboffice-db",
"firewall-weboffice-webdav",
"domain-weboffice"
]
},
{
"IMAGE": "registry.dev.format.hu/weboffice-webdav:7",
"NAME": "webofficewebdav-app",
"MEMORY": "512M",
"NETWORK": "weboffice-net",
"SELECTOR": "webofficewebdav-app",
"VOLUMES": [
{
"SOURCE": "/etc/user/data/weboffice/upload",
"DEST": "/var/www/weboffice/upload",
"TYPE": "rw"
}
],
"PORTS": [
{
"SOURCE": "null",
"DEST": "8009",
"TYPE": "tcp"
}
],
"ENV_FILES": [
"/etc/user/secret/weboffice/weboffice.json"
],
"EXTRA": "--restart always --privileged",
"DEPEND": "null",
"START_ON_BOOT": "false",
"CMD": "null",
"PRE_START": "null",
"POST_START": "null"
}
]
}

75
weboffice/template.json Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,25 @@
{
"webofficemysql": {
"MARIADB_DATABASE": "#MARIADB_DATABASE",
"MARIADB_USER": "#MARIADB_USER",
"MARIADB_PASSWORD": "#MARIADB_PASSWORD",
"MARIADB_ROOT_PASSWORD": "#MARIADB_ROOT_PASSWORD"
},
"webofficeapache": {
"WEBOFFICE": "true",
"SERVER_NAME": "#DOMAIN",
"SERVER_PORT": "8080",
"SERVER_URL": "https://#DOMAIN",
"DB_HOST": "webofficemysql-db",
"DB_NAME": "#MARIADB_DATABASE",
"DB_USER": "#MARIADB_USER",
"DB_PASSWD": "#MARIADB_PASSWORD"
},
"webofficewebdav": {
"DB_HOST": "webofficemysql-db",
"DB_PORT": "3306",
"DB_NAME": "#MARIADB_DATABASE",
"DB_USER": "#MARIADB_USER",
"DB_PASSWD": "#MARIADB_PASSWORD"
}
}