From 8105be044c9eee83c78c027f3641130773030ebd Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 16 Jun 2024 20:59:09 +0000 Subject: [PATCH 1/9] Auto-update READMEs --- ALL_README.md | 2 ++ README_es.md | 48 +++++++++++++++++++++++++++++++++++++++++++++++ README_zh_Hans.md | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 98 insertions(+) create mode 100644 README_es.md create mode 100644 README_zh_Hans.md diff --git a/ALL_README.md b/ALL_README.md index 77b7509..152f2e7 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,6 +1,8 @@ # All available README files by language - [Read the README in English](README.md) +- [Lea el README en español](README_es.md) - [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) +- [阅读中文(简体)的 README](README_zh_Hans.md) diff --git a/README_es.md b/README_es.md new file mode 100644 index 0000000..9b8a100 --- /dev/null +++ b/README_es.md @@ -0,0 +1,48 @@ + + +# MicroBin para Yunohost + +[![Nivel de integración](https://dash.yunohost.org/integration/microbin.svg)](https://dash.yunohost.org/appci/app/microbin) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/microbin.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/microbin.maintain.svg) + +[![Instalar MicroBin con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=microbin) + +*[Leer este README en otros idiomas.](./ALL_README.md)* + +> *Este paquete le permite instalarMicroBin rapidamente y simplement en un servidor YunoHost.* +> *Si no tiene YunoHost, visita [the guide](https://yunohost.org/install) para aprender como instalarla.* + +## Descripción general + +MicroBin is a super tiny, feature rich, configurable, self-contained and self-hosted paste bin web application. It is very easy to set up and use, and will only require a few megabytes of memory and disk storage. + +**Versión actual:** 2.0.4~ynh1 + +**Demo:** + +## Capturas + +![Captura de MicroBin](./doc/screenshots/screenshot7.png) + +## Documentaciones y recursos + +- Sitio web oficial: +- Repositorio del código fuente oficial de la aplicación : +- Catálogo YunoHost: +- Reportar un error: + +## Información para desarrolladores + +Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/microbin_ynh/tree/testing + +Para probar la rama `testing`, sigue asÍ: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/microbin_ynh/tree/testing --debug +o +sudo yunohost app upgrade microbin -u https://github.com/YunoHost-Apps/microbin_ynh/tree/testing --debug +``` + +**Mas informaciones sobre el empaquetado de aplicaciones:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md new file mode 100644 index 0000000..e852aa5 --- /dev/null +++ b/README_zh_Hans.md @@ -0,0 +1,48 @@ + + +# YunoHost 上的 MicroBin + +[![集成程度](https://dash.yunohost.org/integration/microbin.svg)](https://dash.yunohost.org/appci/app/microbin) ![工作状态](https://ci-apps.yunohost.org/ci/badges/microbin.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/microbin.maintain.svg) + +[![使用 YunoHost 安装 MicroBin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=microbin) + +*[阅读此 README 的其它语言版本。](./ALL_README.md)* + +> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 MicroBin。* +> *如果您还没有 YunoHost,请参阅[指南](https://yunohost.org/install)了解如何安装它。* + +## 概况 + +MicroBin is a super tiny, feature rich, configurable, self-contained and self-hosted paste bin web application. It is very easy to set up and use, and will only require a few megabytes of memory and disk storage. + +**分发版本:** 2.0.4~ynh1 + +**演示:** + +## 截图 + +![MicroBin 的截图](./doc/screenshots/screenshot7.png) + +## 文档与资源 + +- 官方应用网站: +- 上游应用代码库: +- YunoHost 商店: +- 报告 bug: + +## 开发者信息 + +请向 [`testing` 分支](https://github.com/YunoHost-Apps/microbin_ynh/tree/testing) 发送拉取请求。 + +如要尝试 `testing` 分支,请这样操作: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/microbin_ynh/tree/testing --debug +或 +sudo yunohost app upgrade microbin -u https://github.com/YunoHost-Apps/microbin_ynh/tree/testing --debug +``` + +**有关应用打包的更多信息:** From e9a88ae1ef06783cd79bf64b4bcb405350c2dff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 16 Jun 2024 23:03:02 +0200 Subject: [PATCH 2/9] env --- conf/.env | 32 ++++++++++++++++++++++++++++++++ conf/systemd.service | 33 +-------------------------------- 2 files changed, 33 insertions(+), 32 deletions(-) create mode 100644 conf/.env diff --git a/conf/.env b/conf/.env new file mode 100644 index 0000000..3a0eb90 --- /dev/null +++ b/conf/.env @@ -0,0 +1,32 @@ +MICROBIN_ADMIN_USERNAME=__ADMIN__ +MICROBIN_ADMIN_PASSWORD=__PASSWORD__ +MICROBIN_PORT=__PORT__ +MICROBIN_BIND=127.0.0.1 +#MICROBIN_PUBLIC_PATH=https://__DOMAIN__ +#MICROBIN_SHORT_PATH=https://short.net +MICROBIN_DATA_DIR=__DATA_DIR__ +MICROBIN_JSON_DB=false +MICROBIN_EDITABLE=true +MICROBIN_HIDE_HEADER=false +MICROBIN_HIDE_FOOTER=true +MICROBIN_HIDE_LOGO=false +MICROBIN_NO_LISTING=false +MICROBIN_READONLY=false +MICROBIN_SHOW_READ_STATS=true +MICROBIN_THREADS=1 +MICROBIN_GC_DAYS=90 +MICROBIN_WIDE=false +MICROBIN_ETERNAL_PASTA=false +MICROBIN_PRIVATE=true" +MICROBIN_HIGHLIGHTSYNTAX=true +MICROBIN_QR=true +MICROBIN_ENABLE_BURN_AFTER=true +MICROBIN_ENABLE_READONLY=true +MICROBIN_DEFAULT_EXPIRY=24hour +MICROBIN_NO_FILE_UPLOAD=false +MICROBIN_HASH_IDS=false +MICROBIN_ENCRYPTION_CLIENT_SIDE=true +MICROBIN_ENCRYPTION_SERVER_SIDE=true +MICROBIN_MAX_FILE_SIZE_ENCRYPTED_MB=256 +MICROBIN_MAX_FILE_SIZE_UNENCRYPTED_MB=2048 +MICROBIN_DISABLE_TELEMETRY=true \ No newline at end of file diff --git a/conf/systemd.service b/conf/systemd.service index 0111896..0abf708 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -6,38 +6,7 @@ After=network.target Type=simple User=__APP__ Group=__APP__ -Environment="MICROBIN_ADMIN_USERNAME=__ADMIN__" -Environment="MICROBIN_ADMIN_PASSWORD=__PASSWORD__" -Environment="MICROBIN_PORT=__PORT__" -Environment="MICROBIN_BIND=127.0.0.1" -# Environment="MICROBIN_PUBLIC_PATH=https://__DOMAIN__" -# Environment="MICROBIN_SHORT_PATH=https://short.net" -Environment="MICROBIN_DATA_DIR=__DATA_DIR__ -Environment="MICROBIN_JSON_DB=false" -Environment="MICROBIN_EDITABLE=true" -Environment="MICROBIN_HIDE_HEADER=false" -Environment="MICROBIN_HIDE_FOOTER=true" -Environment="MICROBIN_HIDE_LOGO=false" -Environment="MICROBIN_NO_LISTING=false" -Environment="MICROBIN_READONLY=false" -Environment="MICROBIN_SHOW_READ_STATS=true" -Environment="MICROBIN_THREADS=1" -Environment="MICROBIN_GC_DAYS=90" -Environment="MICROBIN_WIDE=false" -Environment="MICROBIN_ETERNAL_PASTA=false" -Environment="MICROBIN_PRIVATE=true" -Environment="MICROBIN_HIGHLIGHTSYNTAX=true" -Environment="MICROBIN_QR=true" -Environment="MICROBIN_ENABLE_BURN_AFTER=true" -Environment="MICROBIN_ENABLE_READONLY=true" -Environment="MICROBIN_DEFAULT_EXPIRY=24hour" -Environment="MICROBIN_NO_FILE_UPLOAD=false" -Environment="MICROBIN_HASH_IDS=false" -Environment="MICROBIN_ENCRYPTION_CLIENT_SIDE=true" -Environment="MICROBIN_ENCRYPTION_SERVER_SIDE=true" -Environment="MICROBIN_MAX_FILE_SIZE_ENCRYPTED_MB=256" -Environment="MICROBIN_MAX_FILE_SIZE_UNENCRYPTED_MB=2048" -Environment="MICROBIN_DISABLE_TELEMETRY=true" +EnvironmentFile=__INSTALL_DIR__/.env WorkingDirectory=__INSTALL_DIR__/ ExecStart=__INSTALL_DIR__/microbin From ff5d4e118bf51dac81139d7e4b86a2c659d7b25b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 16 Jun 2024 23:04:17 +0200 Subject: [PATCH 3/9] Update .env --- conf/.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/.env b/conf/.env index 3a0eb90..1683a66 100644 --- a/conf/.env +++ b/conf/.env @@ -11,7 +11,7 @@ MICROBIN_HIDE_HEADER=false MICROBIN_HIDE_FOOTER=true MICROBIN_HIDE_LOGO=false MICROBIN_NO_LISTING=false -MICROBIN_READONLY=false +MICROBIN_READONLY=true MICROBIN_SHOW_READ_STATS=true MICROBIN_THREADS=1 MICROBIN_GC_DAYS=90 From 8942a6dd497793c104a6d098ebdf1873115f2283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 16 Jun 2024 23:10:34 +0200 Subject: [PATCH 4/9] Update .env --- conf/.env | 269 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 237 insertions(+), 32 deletions(-) diff --git a/conf/.env b/conf/.env index 1683a66..ec28b10 100644 --- a/conf/.env +++ b/conf/.env @@ -1,32 +1,237 @@ -MICROBIN_ADMIN_USERNAME=__ADMIN__ -MICROBIN_ADMIN_PASSWORD=__PASSWORD__ -MICROBIN_PORT=__PORT__ -MICROBIN_BIND=127.0.0.1 -#MICROBIN_PUBLIC_PATH=https://__DOMAIN__ -#MICROBIN_SHORT_PATH=https://short.net -MICROBIN_DATA_DIR=__DATA_DIR__ -MICROBIN_JSON_DB=false -MICROBIN_EDITABLE=true -MICROBIN_HIDE_HEADER=false -MICROBIN_HIDE_FOOTER=true -MICROBIN_HIDE_LOGO=false -MICROBIN_NO_LISTING=false -MICROBIN_READONLY=true -MICROBIN_SHOW_READ_STATS=true -MICROBIN_THREADS=1 -MICROBIN_GC_DAYS=90 -MICROBIN_WIDE=false -MICROBIN_ETERNAL_PASTA=false -MICROBIN_PRIVATE=true" -MICROBIN_HIGHLIGHTSYNTAX=true -MICROBIN_QR=true -MICROBIN_ENABLE_BURN_AFTER=true -MICROBIN_ENABLE_READONLY=true -MICROBIN_DEFAULT_EXPIRY=24hour -MICROBIN_NO_FILE_UPLOAD=false -MICROBIN_HASH_IDS=false -MICROBIN_ENCRYPTION_CLIENT_SIDE=true -MICROBIN_ENCRYPTION_SERVER_SIDE=true -MICROBIN_MAX_FILE_SIZE_ENCRYPTED_MB=256 -MICROBIN_MAX_FILE_SIZE_UNENCRYPTED_MB=2048 -MICROBIN_DISABLE_TELEMETRY=true \ No newline at end of file +# Require username for HTTP Basic Authentication when +# visiting the service. If basic auth username is set but +# basic auth password is not, just leave the password field +# empty when logging in. You can also just go to +# https://username:password@yourserver.net or +# https://username@yourserver.net if password is not set +# instead of typing into the password +# Default value: unset +# export MICROBIN_BASIC_AUTH_USERNAME= + +# Require password for HTTP Basic Authentication when +# visiting the service. Will not have any affect unless +# basic auth username is also set. If basic auth username is +# set but basic auth password is not, just leave the +# password field empty when logging in. You can also just go +# to https://username:password@yourserver.net or +# https://username@yourserver.net if password is not set +# instead of typing into the password prompt. +# Default value: unset +# export MICROBIN_BASIC_AUTH_PASSWORD= + +# Enables administrator interface at yourserver.com/admin/ +# if set, disables it if unset. If admin username is set but +# admin password is not, just leave the password field empty +# when logging in. +# Default value: admin +export MICROBIN_ADMIN_USERNAME=__ADMIN__ + +# Enables administrator interface at yourserver.com/admin/ +# if set, disables it if unset. Will not have any affect +# unless admin username is also set. If admin username is +# set but admin password is not, just leave the password +# field empty when logging in. +# Default value: m1cr0b1n +export MICROBIN_ADMIN_PASSWORD=__PASSWORD__ + +# Enables editable pastas. You will still be able to make +# finalised pastas but there will be an extra checkbox to +# make your new pasta editable from the pasta list or the +# pasta view page. +# Default value: 8080 +export MICROBIN_EDITABLE=true + +# Replaces the default footer text with your own. If you +# want to hide the footer, use the hide footer option instead. +# Note that you can also embed HTML here, so you may want to escape +# '<', '>' and so on. +# export MICROBIN_FOOTER_TEXT= + +# Hides the navigation bar on every page. +# Default value: 8080 +export MICROBIN_HIDE_HEADER=false + +# Hides the footer on every page. +# Default value: 8080 +export MICROBIN_HIDE_FOOTER=false + +# Hides the MicroBin logo from the navigation bar on every +# page. +# Default value: 8080 +export MICROBIN_HIDE_LOGO=false + +# Disables the /pastalist endpoint, essentially making all +# pastas private. +# Default value: 8080 +export MICROBIN_NO_LISTING=false + +# Enables syntax highlighting support. When creating a new +# pasta, a new dropdown selector will be added where you can +# select your pasta's syntax, or just leave it empty for no +# highlighting. +export MICROBIN_HIGHLIGHTSYNTAX=true + +# Sets the port for the server will be listening on. +# Default value: 8080 +export MICROBIN_PORT=__PORT__ + +# Sets the bind address for the server will be listening on. +# Both ipv4 and ipv6 are supported. Default value: "0.0.0.0". +# Example value: "myserver.net", "127.0.0.1". +export MICROBIN_BIND="127.0.0.1" + +# Enables private pastas. Adds a new checkbox to make your +# pasta private, which then won't show up on the pastalist +# page. With the URL to your pasta, it will still be +# accessible. +# Default value: false +export MICROBIN_PRIVATE=true + +# DEPRECATED: Will be removed soon. If you want to change styling (incl. removal), use custom CSS variable instead. +# Disables main CSS styling, just uses a few in-line +# stylings for the layout. With this option you will lose +# dark-mode support. +export MICROBIN_PURE_HTML=false + +# Sets the name of the directory where MicroBin creates +# its database and stores attachments. +# Default value: microbin_data +export MICROBIN_DATA_DIR="microbin_data" + +# Enables storing pasta data (not attachments and files) in +# a JSON file instead of the SQLite database. +# Default value: false +export MICROBIN_JSON_DB=false + +# Add the given public path prefix to all urls. This allows +# you to host MicroBin behind a reverse proxy on a subpath. +# Note that MicroBin itself still expects all routes to be +# as without this option, and thus is unsuited if you are +# running MicroBin directly. Default value: unset. Example +# values: https://myserver.com/ or https://192.168.0.10:8080/ +# export MICROBIN_PUBLIC_PATH=https://__DOMAIN____PATH__/ + +# Sets a shortened path to use when the user copies URL from +# the application. This will also use shorter endpoints, +# such as /p/ instead if /pasta/. Default value: +# unset.Example value: https://b.in/ export +# MICROBIN_SHORT_PATH= + +# The password required for uploading, if read-only mode is enabled +# Default value: unset +# export MICROBIN_UPLOADER_PASSWORD= + +# If set to true, authentication required for uploading +# Default value: false +export MICROBIN_READONLY=true + +# Enables showing read count on pasta pages. +# Default value: false +export MICROBIN_SHOW_READ_STATS=true + +# Adds your title of choice to the +# navigation bar. +# Default value: unset +# export MICROBIN_TITLE= + +# Number of workers MicroBin is allowed to have. Increase +# this to the number of CPU cores you have if you want to go +# beast mode, but for personal use one worker is enough. +# Default value: 1. +export MICROBIN_THREADS=1 + +# Sets the garbage collector time limit. Pastas not accessed +# for N days are removed even if they are set to never +# expire. +# Default value: 90. +# To turn off GC: 0. +export MICROBIN_GC_DAYS=90 + +# Enables or disables the "Burn after" function +# Default value: false +export MICROBIN_ENABLE_BURN_AFTER=true + +# Sets the default burn after setting on the main screen. +# Default value: 0. Available expiration options: 1, 10, +# 100, 1000, 10000, 0 (= no limit) +export MICROBIN_DEFAULT_BURN_AFTER=0 + +# Changes the maximum width of the UI from 720 pixels to +# 1080 pixels. +# Default value: false +export MICROBIN_WIDE=false + +# Enables generating QR codes for pastas. Requires +# the public path to also be set. +# Default value: false +export MICROBIN_QR=true + +# Toggles "Never" expiry settings for pastas. Default +# value: false +export MICROBIN_ETERNAL_PASTA=false + +# Enables "Read-only" uploads. These are unlisted and +# unencrypted, but can be viewed without password if you +# have the URL. Editing and removing requires password. +# Default value: true +export MICROBIN_ENABLE_READONLY=true + +# Sets the default expiry time setting on the main screen. +# Default value: 24hour Available expiration options: 1min, +# 10min, 1hour, 24hour, 1week, never +export MICROBIN_DEFAULT_EXPIRY=24hour + +# Disables and hides the file upload option in the UI. +# Default value: false +export MICROBIN_NO_FILE_UPLOAD=false + +# Replaced the built-in water.css stylesheet with the URL +# you provide. Default value: unset. Example value: +# https://myserver.net/public/mystyle.css +# export MICROBIN_CUSTOM_CSS= + +# Use short hash strings in the URLs instead of animal names +# to make URLs shorter. Does not change the underlying data +# stored, just how pastas are recalled. +# Default value: false +export MICROBIN_HASH_IDS=false + +# Enables server-side encryption. This will add private +# privacy level, where the user sends plain unencrypted data +# (still secure, because you use HTTPS, right?), but the +# server sees everything that the user submits, therefore +# the user does not have complete and absolute protection. +# Default value: false +export MICROBIN_ENCRYPTION_CLIENT_SIDE=true + +# Enables client-side encryption. This will add the secret +# privacy level where the user's browser encrypts all data +# with JavaScript before sending it over to MicroBin, which +# encrypt the data once again on server side. +# Default value: false +export MICROBIN_ENCRYPTION_SERVER_SIDE=true + +# Limit the maximum file size users can upload without +# encryption. Default value: 256. +export MICROBIN_MAX_FILE_SIZE_ENCRYPTED_MB=256 + +# Limit the maximum file size users can upload with +# encryption (more strain on your server than without +# encryption, so the limit should be lower. Secrets tend to +# be tiny files usually anyways.) Default value: 2048. +export MICROBIN_MAX_FILE_SIZE_UNENCRYPTED_MB=2048 + +# Disables the feature that checks for available updates +# when opening the admin screen. +# Default value: false +export MICROBIN_DISABLE_UPDATE_CHECKING=false + +# Disables telemetry if set to true. +# Telemetry includes your configuration and helps development. +# It does not include any sensitive data. +# Default value: false +export MICROBIN_DISABLE_TELEMETRY=true + +# Enables listing your server in the public MicroBin server list. +# Default value: false +export MICROBIN_LIST_SERVER=false \ No newline at end of file From fb2738f3c5a0f6b889d64e39c55f2d3c9e23ba00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 16 Jun 2024 23:16:12 +0200 Subject: [PATCH 5/9] fix --- scripts/install | 10 ++++++++++ scripts/upgrade | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/scripts/install b/scripts/install index dd291c6..0371e37 100755 --- a/scripts/install +++ b/scripts/install @@ -24,6 +24,16 @@ ynh_setup_source --dest_dir="$install_dir" chown -R "$app:www-data" "$install_dir" chmod +x "$install_dir/microbin" +#================================================= +# APP INITIAL CONFIGURATION +#================================================= +ynh_script_progression --message="Adding $app's configuration files..." --weight=1 + +ynh_add_config --template=".env" --destination="$install_dir/.env" + +chmod 400 "$install_dir/.env" +chown "$app:$app" "$install_dir/.env" + #================================================= # SYSTEM CONFIGURATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 9053280..4462a8f 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,6 +25,16 @@ ynh_setup_source --dest_dir="$install_dir" chown -R "$app:www-data" "$install_dir" chmod +x "$install_dir/microbin" +#================================================= +# UPDATE A CONFIG FILE +#================================================= +ynh_script_progression --message="Updating $app's configuration files..." --weight=1 + +ynh_add_config --template=".env" --destination="$install_dir/.env" + +chmod 400 "$install_dir/.env" +chown "$app:$app" "$install_dir/.env" + #================================================= # REAPPLY SYSTEM CONFIGURATIONS #================================================= From 7f5400638d49619be6705776c1cabf44202c72fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 16 Jun 2024 23:21:31 +0200 Subject: [PATCH 6/9] Update .env --- conf/.env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/.env b/conf/.env index ec28b10..e364e19 100644 --- a/conf/.env +++ b/conf/.env @@ -96,7 +96,7 @@ export MICROBIN_PURE_HTML=false # Sets the name of the directory where MicroBin creates # its database and stores attachments. # Default value: microbin_data -export MICROBIN_DATA_DIR="microbin_data" +export MICROBIN_DATA_DIR="__DATA_DIR__" # Enables storing pasta data (not attachments and files) in # a JSON file instead of the SQLite database. @@ -109,7 +109,7 @@ export MICROBIN_JSON_DB=false # as without this option, and thus is unsuited if you are # running MicroBin directly. Default value: unset. Example # values: https://myserver.com/ or https://192.168.0.10:8080/ -# export MICROBIN_PUBLIC_PATH=https://__DOMAIN____PATH__/ +export MICROBIN_PUBLIC_PATH=https://__DOMAIN____PATH__/ # Sets a shortened path to use when the user copies URL from # the application. This will also use shorter endpoints, From 8461588e88443037661b79a49f61e961f0f48062 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 16 Jun 2024 23:26:53 +0200 Subject: [PATCH 7/9] Update .env --- conf/.env | 82 +++++++++++++++++++++++++++---------------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/conf/.env b/conf/.env index e364e19..e6ad18f 100644 --- a/conf/.env +++ b/conf/.env @@ -6,7 +6,7 @@ # https://username@yourserver.net if password is not set # instead of typing into the password # Default value: unset -# export MICROBIN_BASIC_AUTH_USERNAME= +# MICROBIN_BASIC_AUTH_USERNAME= # Require password for HTTP Basic Authentication when # visiting the service. Will not have any affect unless @@ -17,14 +17,14 @@ # https://username@yourserver.net if password is not set # instead of typing into the password prompt. # Default value: unset -# export MICROBIN_BASIC_AUTH_PASSWORD= +# MICROBIN_BASIC_AUTH_PASSWORD= # Enables administrator interface at yourserver.com/admin/ # if set, disables it if unset. If admin username is set but # admin password is not, just leave the password field empty # when logging in. # Default value: admin -export MICROBIN_ADMIN_USERNAME=__ADMIN__ +MICROBIN_ADMIN_USERNAME=__ADMIN__ # Enables administrator interface at yourserver.com/admin/ # if set, disables it if unset. Will not have any affect @@ -32,76 +32,76 @@ export MICROBIN_ADMIN_USERNAME=__ADMIN__ # set but admin password is not, just leave the password # field empty when logging in. # Default value: m1cr0b1n -export MICROBIN_ADMIN_PASSWORD=__PASSWORD__ +MICROBIN_ADMIN_PASSWORD=__PASSWORD__ # Enables editable pastas. You will still be able to make # finalised pastas but there will be an extra checkbox to # make your new pasta editable from the pasta list or the # pasta view page. # Default value: 8080 -export MICROBIN_EDITABLE=true +MICROBIN_EDITABLE=true # Replaces the default footer text with your own. If you # want to hide the footer, use the hide footer option instead. # Note that you can also embed HTML here, so you may want to escape # '<', '>' and so on. -# export MICROBIN_FOOTER_TEXT= +# MICROBIN_FOOTER_TEXT= # Hides the navigation bar on every page. # Default value: 8080 -export MICROBIN_HIDE_HEADER=false +MICROBIN_HIDE_HEADER=false # Hides the footer on every page. # Default value: 8080 -export MICROBIN_HIDE_FOOTER=false +MICROBIN_HIDE_FOOTER=false # Hides the MicroBin logo from the navigation bar on every # page. # Default value: 8080 -export MICROBIN_HIDE_LOGO=false +MICROBIN_HIDE_LOGO=false # Disables the /pastalist endpoint, essentially making all # pastas private. # Default value: 8080 -export MICROBIN_NO_LISTING=false +MICROBIN_NO_LISTING=false # Enables syntax highlighting support. When creating a new # pasta, a new dropdown selector will be added where you can # select your pasta's syntax, or just leave it empty for no # highlighting. -export MICROBIN_HIGHLIGHTSYNTAX=true +MICROBIN_HIGHLIGHTSYNTAX=true # Sets the port for the server will be listening on. # Default value: 8080 -export MICROBIN_PORT=__PORT__ +MICROBIN_PORT=__PORT__ # Sets the bind address for the server will be listening on. # Both ipv4 and ipv6 are supported. Default value: "0.0.0.0". # Example value: "myserver.net", "127.0.0.1". -export MICROBIN_BIND="127.0.0.1" +MICROBIN_BIND="127.0.0.1" # Enables private pastas. Adds a new checkbox to make your # pasta private, which then won't show up on the pastalist # page. With the URL to your pasta, it will still be # accessible. # Default value: false -export MICROBIN_PRIVATE=true +MICROBIN_PRIVATE=true # DEPRECATED: Will be removed soon. If you want to change styling (incl. removal), use custom CSS variable instead. # Disables main CSS styling, just uses a few in-line # stylings for the layout. With this option you will lose # dark-mode support. -export MICROBIN_PURE_HTML=false +MICROBIN_PURE_HTML=false # Sets the name of the directory where MicroBin creates # its database and stores attachments. # Default value: microbin_data -export MICROBIN_DATA_DIR="__DATA_DIR__" +MICROBIN_DATA_DIR="__DATA_DIR__" # Enables storing pasta data (not attachments and files) in # a JSON file instead of the SQLite database. # Default value: false -export MICROBIN_JSON_DB=false +MICROBIN_JSON_DB=false # Add the given public path prefix to all urls. This allows # you to host MicroBin behind a reverse proxy on a subpath. @@ -109,7 +109,7 @@ export MICROBIN_JSON_DB=false # as without this option, and thus is unsuited if you are # running MicroBin directly. Default value: unset. Example # values: https://myserver.com/ or https://192.168.0.10:8080/ -export MICROBIN_PUBLIC_PATH=https://__DOMAIN____PATH__/ +MICROBIN_PUBLIC_PATH=https://__DOMAIN____PATH__/ # Sets a shortened path to use when the user copies URL from # the application. This will also use shorter endpoints, @@ -119,82 +119,82 @@ export MICROBIN_PUBLIC_PATH=https://__DOMAIN____PATH__/ # The password required for uploading, if read-only mode is enabled # Default value: unset -# export MICROBIN_UPLOADER_PASSWORD= +# MICROBIN_UPLOADER_PASSWORD= # If set to true, authentication required for uploading # Default value: false -export MICROBIN_READONLY=true +MICROBIN_READONLY=true # Enables showing read count on pasta pages. # Default value: false -export MICROBIN_SHOW_READ_STATS=true +MICROBIN_SHOW_READ_STATS=true # Adds your title of choice to the # navigation bar. # Default value: unset -# export MICROBIN_TITLE= +# MICROBIN_TITLE= # Number of workers MicroBin is allowed to have. Increase # this to the number of CPU cores you have if you want to go # beast mode, but for personal use one worker is enough. # Default value: 1. -export MICROBIN_THREADS=1 +MICROBIN_THREADS=1 # Sets the garbage collector time limit. Pastas not accessed # for N days are removed even if they are set to never # expire. # Default value: 90. # To turn off GC: 0. -export MICROBIN_GC_DAYS=90 +MICROBIN_GC_DAYS=90 # Enables or disables the "Burn after" function # Default value: false -export MICROBIN_ENABLE_BURN_AFTER=true +MICROBIN_ENABLE_BURN_AFTER=true # Sets the default burn after setting on the main screen. # Default value: 0. Available expiration options: 1, 10, # 100, 1000, 10000, 0 (= no limit) -export MICROBIN_DEFAULT_BURN_AFTER=0 +MICROBIN_DEFAULT_BURN_AFTER=0 # Changes the maximum width of the UI from 720 pixels to # 1080 pixels. # Default value: false -export MICROBIN_WIDE=false +MICROBIN_WIDE=false # Enables generating QR codes for pastas. Requires # the public path to also be set. # Default value: false -export MICROBIN_QR=true +MICROBIN_QR=true # Toggles "Never" expiry settings for pastas. Default # value: false -export MICROBIN_ETERNAL_PASTA=false +MICROBIN_ETERNAL_PASTA=false # Enables "Read-only" uploads. These are unlisted and # unencrypted, but can be viewed without password if you # have the URL. Editing and removing requires password. # Default value: true -export MICROBIN_ENABLE_READONLY=true +MICROBIN_ENABLE_READONLY=true # Sets the default expiry time setting on the main screen. # Default value: 24hour Available expiration options: 1min, # 10min, 1hour, 24hour, 1week, never -export MICROBIN_DEFAULT_EXPIRY=24hour +MICROBIN_DEFAULT_EXPIRY=24hour # Disables and hides the file upload option in the UI. # Default value: false -export MICROBIN_NO_FILE_UPLOAD=false +MICROBIN_NO_FILE_UPLOAD=false # Replaced the built-in water.css stylesheet with the URL # you provide. Default value: unset. Example value: # https://myserver.net/public/mystyle.css -# export MICROBIN_CUSTOM_CSS= +# MICROBIN_CUSTOM_CSS= # Use short hash strings in the URLs instead of animal names # to make URLs shorter. Does not change the underlying data # stored, just how pastas are recalled. # Default value: false -export MICROBIN_HASH_IDS=false +MICROBIN_HASH_IDS=false # Enables server-side encryption. This will add private # privacy level, where the user sends plain unencrypted data @@ -202,36 +202,36 @@ export MICROBIN_HASH_IDS=false # server sees everything that the user submits, therefore # the user does not have complete and absolute protection. # Default value: false -export MICROBIN_ENCRYPTION_CLIENT_SIDE=true +MICROBIN_ENCRYPTION_CLIENT_SIDE=true # Enables client-side encryption. This will add the secret # privacy level where the user's browser encrypts all data # with JavaScript before sending it over to MicroBin, which # encrypt the data once again on server side. # Default value: false -export MICROBIN_ENCRYPTION_SERVER_SIDE=true +MICROBIN_ENCRYPTION_SERVER_SIDE=true # Limit the maximum file size users can upload without # encryption. Default value: 256. -export MICROBIN_MAX_FILE_SIZE_ENCRYPTED_MB=256 +MICROBIN_MAX_FILE_SIZE_ENCRYPTED_MB=256 # Limit the maximum file size users can upload with # encryption (more strain on your server than without # encryption, so the limit should be lower. Secrets tend to # be tiny files usually anyways.) Default value: 2048. -export MICROBIN_MAX_FILE_SIZE_UNENCRYPTED_MB=2048 +MICROBIN_MAX_FILE_SIZE_UNENCRYPTED_MB=2048 # Disables the feature that checks for available updates # when opening the admin screen. # Default value: false -export MICROBIN_DISABLE_UPDATE_CHECKING=false +MICROBIN_DISABLE_UPDATE_CHECKING=false # Disables telemetry if set to true. # Telemetry includes your configuration and helps development. # It does not include any sensitive data. # Default value: false -export MICROBIN_DISABLE_TELEMETRY=true +MICROBIN_DISABLE_TELEMETRY=true # Enables listing your server in the public MicroBin server list. # Default value: false -export MICROBIN_LIST_SERVER=false \ No newline at end of file +MICROBIN_LIST_SERVER=false \ No newline at end of file From fa9399e7df8d9423f9349029a2048ffb694a01c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 16 Jun 2024 23:29:12 +0200 Subject: [PATCH 8/9] Update .env --- conf/.env | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/.env b/conf/.env index e6ad18f..9760273 100644 --- a/conf/.env +++ b/conf/.env @@ -48,21 +48,21 @@ MICROBIN_EDITABLE=true # MICROBIN_FOOTER_TEXT= # Hides the navigation bar on every page. -# Default value: 8080 +# Default value: false MICROBIN_HIDE_HEADER=false # Hides the footer on every page. -# Default value: 8080 +# Default value: false MICROBIN_HIDE_FOOTER=false # Hides the MicroBin logo from the navigation bar on every # page. -# Default value: 8080 +# Default value: false MICROBIN_HIDE_LOGO=false # Disables the /pastalist endpoint, essentially making all # pastas private. -# Default value: 8080 +# Default value: false MICROBIN_NO_LISTING=false # Enables syntax highlighting support. When creating a new From dc659a4642c979a6d974a74131d05f6f2b82233b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 16 Jun 2024 23:30:00 +0200 Subject: [PATCH 9/9] Update manifest.toml --- manifest.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/manifest.toml b/manifest.toml index 28b44f0..1d121fa 100644 --- a/manifest.toml +++ b/manifest.toml @@ -35,6 +35,10 @@ ram.runtime = "50M" [install.domain] type = "domain" + [install.path] + type = "path" + default = "/microbin" + [install.init_main_permission] type = "group" default = "visitors"