mirror of
https://github.com/YunoHost-Apps/writefreely_ynh.git
synced 2024-09-03 20:36:02 +02:00
commit
c180000953
18 changed files with 197 additions and 108 deletions
72
README.md
72
README.md
|
@ -1,67 +1,49 @@
|
|||
<!--
|
||||
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
|
||||
It shall NOT be edited by hand.
|
||||
-->
|
||||
|
||||
# WriteFreely for YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/writefreely)  
|
||||
[](https://install-app.yunohost.org/?app=writefreely)
|
||||
|
||||
*[Lire ce readme en français.](./README_fr.md)*
|
||||
|
||||
> *This package allows you to install WriteFreely quickly and simply on a YunoHost server.
|
||||
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
|
||||
|
||||
## Overview
|
||||
WriteFreely is a beautifully pared-down blogging platform that's simple on the surface, yet powerful underneath.
|
||||
|
||||
Can be run as Single User Blog or Multi User Instance.
|
||||
For starting a minimalist, federated blog or an entire community.
|
||||
|
||||
Each User can be limited from 1 to unlimited blogs.
|
||||
**Shipped version:** 0.13.0~ynh1
|
||||
|
||||
**Shipped version:** v0.12.0
|
||||
|
||||
## Important points to read before installing
|
||||
|
||||
**WriteFreely** require a dedicated **root domain**, eg. writefreely.domain.tld
|
||||
**Demo:** https://write.as/new
|
||||
|
||||
## Screenshots
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||

|
||||
## Disclaimers / important information
|
||||
|
||||
## Demo
|
||||
* Any known limitations, constrains or stuff not working, such as (but not limited to):
|
||||
* **WriteFreely** require a dedicated **root domain**, eg. writefreely.domain.tld
|
||||
* i386 architectures not supported
|
||||
* No LDAP and no HTTP auth supported
|
||||
|
||||
* [Official demo](https://write.as/new)
|
||||
* Other infos that people should be aware of, such as:
|
||||
* If User Mode is configured Multiple users, the app be used by multiple users
|
||||
* Additionals parameters can be configured in Settings / Admin settings.
|
||||
|
||||
## Configuration
|
||||
## Documentation and resources
|
||||
|
||||
Additionals parameters can be configure in Settings / admin settings.
|
||||
|
||||
## Documentation
|
||||
|
||||
* Official documentation: https://writefreely.org/start
|
||||
|
||||
## YunoHost specific features
|
||||
|
||||
#### Multi-user support
|
||||
|
||||
No LDAP and no HTTP auth supported
|
||||
|
||||
If User Mode is configured Multiple users, the app be used by multiple users
|
||||
|
||||
#### Supported architectures
|
||||
|
||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/writefreely/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/writefreely/)
|
||||
|
||||
## Limitations
|
||||
|
||||
* No known limitations.
|
||||
|
||||
## Links
|
||||
|
||||
* Report a bug: https://github.com/YunoHost-Apps/writefreely_ynh/issues
|
||||
* App website: https://writefreely.org/
|
||||
* Upstream app repository: https://github.com/writeas/writefreely
|
||||
* YunoHost website: https://yunohost.org/
|
||||
|
||||
---
|
||||
* Official app website: https://writefreely.org
|
||||
* Official user documentation: https://writefreely.org/start
|
||||
* Upstream app code repository: https://github.com/writeas/writefreely
|
||||
* YunoHost documentation for this app: https://yunohost.org/app_writefreely
|
||||
* Report a bug: https://github.com/YunoHost-Apps/writefreely_ynh/issues
|
||||
|
||||
## Developer info
|
||||
|
||||
|
@ -73,3 +55,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/writefreely_ynh/tree/
|
|||
or
|
||||
sudo yunohost app upgrade writefreely -u https://github.com/YunoHost-Apps/writefreely_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**More info regarding app packaging:** https://yunohost.org/packaging_apps
|
55
README_fr.md
Normal file
55
README_fr.md
Normal file
|
@ -0,0 +1,55 @@
|
|||
# WriteFreely pour YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/writefreely)  
|
||||
[](https://install-app.yunohost.org/?app=writefreely)
|
||||
|
||||
*[Read this readme in english.](./README.md)*
|
||||
*[Lire ce readme en français.](./README_fr.md)*
|
||||
|
||||
> *Ce package vous permet d'installer WriteFreely rapidement et simplement sur un serveur YunoHost.
|
||||
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
|
||||
|
||||
## Vue d'ensemble
|
||||
|
||||
Permet de créer un blog fédéré minimaliste ou une communauté entière.
|
||||
|
||||
**Version incluse :** 0.13.0~ynh1
|
||||
|
||||
**Démo :** https://write.as/new
|
||||
|
||||
## Captures d'écran
|
||||
|
||||

|
||||

|
||||
|
||||
## Avertissements / informations importantes
|
||||
|
||||
* Any known limitations, constrains or stuff not working, such as (but not limited to):
|
||||
* **WriteFreely** require a dedicated **root domain**, eg. writefreely.domain.tld
|
||||
* i386 architectures not supported
|
||||
* No LDAP and no HTTP auth supported
|
||||
|
||||
* Other infos that people should be aware of, such as:
|
||||
* If User Mode is configured Multiple users, the app be used by multiple users
|
||||
* Additionals parameters can be configured in Settings / Admin settings.
|
||||
|
||||
## Documentations et ressources
|
||||
|
||||
* Site officiel de l'app : https://writefreely.org
|
||||
* Documentation officielle utilisateur : https://writefreely.org/start
|
||||
* Dépôt de code officiel de l'app : https://github.com/writeas/writefreely
|
||||
* Documentation YunoHost pour cette app : https://yunohost.org/app_writefreely
|
||||
* Signaler un bug : https://github.com/YunoHost-Apps/writefreely_ynh/issues
|
||||
|
||||
## Informations pour les développeurs
|
||||
|
||||
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/writefreely_ynh/tree/testing).
|
||||
|
||||
Pour essayer la branche testing, procédez comme suit.
|
||||
```
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/writefreely_ynh/tree/testing --debug
|
||||
ou
|
||||
sudo yunohost app upgrade writefreely -u https://github.com/YunoHost-Apps/writefreely_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps
|
|
@ -23,6 +23,8 @@
|
|||
upgrade=1 from_commit=5ac207e14985bda77dc797353902548696622b41
|
||||
# 0.12.0~ynh4
|
||||
upgrade=1 from_commit=d75ccbc460b04ef95f3d8b1a72ee77fc7815c6a2
|
||||
# 0.12.0~ynh6
|
||||
upgrade=1 from_commit=b387e4186a02c387d734cf25f4fed9283c01d55f
|
||||
backup_restore=1
|
||||
multi_instance=1
|
||||
port_already_use=0
|
||||
|
@ -41,3 +43,5 @@ Notification=all
|
|||
name=0.12.0~ynh3
|
||||
; commit=d75ccbc460b04ef95f3d8b1a72ee77fc7815c6a2
|
||||
name=0.12.0~ynh4
|
||||
; commit=b387e4186a02c387d734cf25f4fed9283c01d55f
|
||||
name=0.12.0~ynh6
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/writeas/writefreely/releases/download/v0.12.0/writefreely_0.12.0_linux_arm7.tar.gz
|
||||
SOURCE_SUM=2b05f0923de85de95c7e051eeb58d25d1366c1871d80c8b19691c4d8f238615e
|
||||
SOURCE_URL=https://github.com/writeas/writefreely/releases/download/v0.13.0/writefreely_0.13.0_linux_arm7.tar.gz
|
||||
SOURCE_SUM=7e3e900c9cd135f912f12f2938a6987e19b2d5e63c7155a0ef4b272506dd86a3
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/writeas/writefreely/releases/download/v0.12.0/writefreely_0.12.0_linux_arm64.tar.gz
|
||||
SOURCE_SUM=d1efb86779abd253076ba50eba973304f2e3bf3f1e2ec8c11f09ef177d860507
|
||||
SOURCE_URL=https://github.com/writeas/writefreely/releases/download/v0.13.0/writefreely_0.13.0_linux_arm64.tar.gz
|
||||
SOURCE_SUM=ba1ad53b30c537059b8af29cbf3406b78efcc7bf10b8224bdcacdc1b56b9a1e1
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
|
|
|
@ -10,6 +10,7 @@ static_parent_dir =
|
|||
pages_parent_dir =
|
||||
keys_parent_dir =
|
||||
hash_seed =
|
||||
gopher_port = 0
|
||||
|
||||
[database]
|
||||
type = mysql
|
||||
|
@ -19,11 +20,12 @@ password = __DB_PWD__
|
|||
database = __DB_NAME__
|
||||
host = localhost
|
||||
port = 3306
|
||||
tls = false
|
||||
|
||||
[app]
|
||||
site_name = WriteFreely
|
||||
site_description = WriteFreely_Blogs
|
||||
host = __DOMAIN__
|
||||
host = https://__DOMAIN__
|
||||
theme = write
|
||||
editor =
|
||||
disable_js = false
|
||||
|
@ -36,15 +38,19 @@ forest = false
|
|||
disable_drafts = false
|
||||
single_user = __SINGLE_USER__
|
||||
open_registration = true
|
||||
open_deletion = true
|
||||
min_username_len = 3
|
||||
max_blogs = 4
|
||||
max_blogs = 1
|
||||
federation = true
|
||||
public_stats = true
|
||||
monetization = false
|
||||
notes_only = false
|
||||
private = false
|
||||
local_timeline = true
|
||||
user_invites =
|
||||
default_visibility =
|
||||
update_checks = false
|
||||
disable_password_auth = false
|
||||
|
||||
[oauth.slack]
|
||||
client_id =
|
||||
|
@ -70,3 +76,27 @@ display_name =
|
|||
callback_proxy =
|
||||
callback_proxy_api =
|
||||
|
||||
[oauth.gitea]
|
||||
client_id =
|
||||
client_secret =
|
||||
host =
|
||||
display_name =
|
||||
callback_proxy =
|
||||
callback_proxy_api =
|
||||
|
||||
[oauth.generic]
|
||||
client_id =
|
||||
client_secret =
|
||||
host =
|
||||
display_name =
|
||||
callback_proxy =
|
||||
callback_proxy_api =
|
||||
token_endpoint =
|
||||
inspect_endpoint =
|
||||
auth_endpoint =
|
||||
scope =
|
||||
allow_disconnect = false
|
||||
map_user_id =
|
||||
map_username =
|
||||
map_display_name =
|
||||
map_email =
|
||||
|
|
|
@ -15,10 +15,10 @@ location ~ ^/(css|img|js|fonts)/ {
|
|||
}
|
||||
|
||||
location __PATH__/ {
|
||||
proxy_pass http://localhost:__PORT__;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_pass http://127.0.0.1:__PORT__;
|
||||
proxy_redirect off;
|
||||
|
||||
# Include SSOWAT user panel.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/writeas/writefreely/releases/download/v0.12.0/writefreely_0.12.0_linux_amd64.tar.gz
|
||||
SOURCE_SUM=9563cda11cb3f789dc9ffccada48b377bf7b567b813cca7ed4706cc1c570c613
|
||||
SOURCE_URL=https://github.com/writeas/writefreely/releases/download/v0.13.0/writefreely_0.13.0_linux_amd64.tar.gz
|
||||
SOURCE_SUM=bb20ac62975f54214b22a6668796bb0ff90f857fa793c3f3fc0fc4794c5dcc82
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
|
|
0
doc/.gitkeep
Normal file
0
doc/.gitkeep
Normal file
8
doc/DISCLAIMER.md
Normal file
8
doc/DISCLAIMER.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
* Any known limitations, constrains or stuff not working, such as (but not limited to):
|
||||
* **WriteFreely** require a dedicated **root domain**, eg. writefreely.domain.tld
|
||||
* i386 architectures not supported
|
||||
* No LDAP and no HTTP auth supported
|
||||
|
||||
* Other infos that people should be aware of, such as:
|
||||
* If User Mode is configured Multiple users, the app be used by multiple users
|
||||
* Additionals parameters can be configured in Settings / Admin settings.
|
0
doc/screenshots/.gitkeep
Normal file
0
doc/screenshots/.gitkeep
Normal file
BIN
doc/screenshots/screenshots1.png
Normal file
BIN
doc/screenshots/screenshots1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 388 KiB |
BIN
doc/screenshots/screenshots2.png
Normal file
BIN
doc/screenshots/screenshots2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 443 KiB |
|
@ -3,11 +3,18 @@
|
|||
"id": "writefreely",
|
||||
"packaging_format": 1,
|
||||
"description": {
|
||||
"en": "For starting a minimalist, federated blog — or an entire community.",
|
||||
"en": "For starting a minimalist, federated blog or an entire community.",
|
||||
"fr": "Permet de créer un blog fédéré minimaliste ou une communauté entière."
|
||||
},
|
||||
"version": "0.12.0~ynh6",
|
||||
"version": "0.13.0~ynh1",
|
||||
"url": "https://writefreely.org",
|
||||
"upstream": {
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"website": "https://writefreely.org",
|
||||
"demo": "https://write.as/new",
|
||||
"userdoc": "https://writefreely.org/start",
|
||||
"code": "https://github.com/writeas/writefreely"
|
||||
},
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"maintainer": {
|
||||
"name": "yalh76"
|
||||
|
|
|
@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
|
||||
ynh_clean_setup () {
|
||||
ynh_clean_check_starting
|
||||
true
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
|
|
@ -85,7 +85,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port
|
|||
ynh_script_progression --message="Configuring system user..."
|
||||
|
||||
# Create a system user
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
ynh_system_user_create --username=$app --home_dir=$final_path
|
||||
|
||||
#=================================================
|
||||
# CREATE A MYSQL DATABASE
|
||||
|
|
|
@ -32,7 +32,6 @@ path_url=$(ynh_app_setting_get --app=$app --key=path)
|
|||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||
db_user=$db_name
|
||||
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE RESTORED
|
||||
|
@ -59,7 +58,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|||
ynh_script_progression --message="Recreating the dedicated system user..."
|
||||
|
||||
# Create the dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
ynh_system_user_create --username=$app --home_dir=$final_path
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE APP MAIN DIR
|
||||
|
@ -79,6 +78,7 @@ chown -R $app:www-data "$final_path"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Restoring the MySQL database..."
|
||||
|
||||
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
||||
|
||||
|
|
|
@ -36,6 +36,30 @@ ynh_script_progression --message="Checking version..."
|
|||
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..."
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
ynh_clean_setup () {
|
||||
ynh_clean_check_starting
|
||||
# Restore it if the upgrade fails
|
||||
ynh_restore_upgradebackup
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
#=================================================
|
||||
# STOP SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Stopping a systemd service..."
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped Write Freely"
|
||||
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
|
@ -71,37 +95,13 @@ if ! ynh_permission_exists --permission="api"; then
|
|||
ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..."
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
ynh_clean_setup () {
|
||||
ynh_clean_check_starting
|
||||
# Restore it if the upgrade fails
|
||||
ynh_restore_upgradebackup
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
#=================================================
|
||||
# STOP SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Stopping a systemd service..."
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped Write Freely"
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Making sure dedicated system user exists..."
|
||||
|
||||
# Create a dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
ynh_system_user_create --username=$app --home_dir=$final_path
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
|
@ -138,6 +138,7 @@ pushd $final_path
|
|||
ynh_mysql_execute_as_root --sql="ALTER DATABASE $db_name CHARACTER SET latin1 COLLATE latin1_swedish_ci;" --database=$db_name
|
||||
sudo -u $app ./writefreely db migrate
|
||||
sudo -u $app ./writefreely --migrate
|
||||
sudo -u $app ./writefreely keys generate
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue