mirror of
https://github.com/YunoHost-Apps/dont-code_ynh.git
synced 2024-09-03 18:26:34 +02:00
Merge pull request #45 from YunoHost-Apps/dev
Support for auto-repositories
This commit is contained in:
commit
f274330619
11 changed files with 140 additions and 6 deletions
|
@ -32,7 +32,7 @@ This Yunohost app installs the server part (services + mongo database) needed to
|
|||
- As well any documents or images uploaded by users will be backed up
|
||||
|
||||
|
||||
**Shipped version:** 0.3.1~ynh1
|
||||
**Shipped version:** 0.3.1~ynh2
|
||||
|
||||
**Demo:** <https://dont-code.net/apps.html>
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ This Yunohost app installs the server part (services + mongo database) needed to
|
|||
- As well any documents or images uploaded by users will be backed up
|
||||
|
||||
|
||||
**Paketatutako bertsioa:** 0.3.1~ynh1
|
||||
**Paketatutako bertsioa:** 0.3.1~ynh2
|
||||
|
||||
**Demoa:** <https://dont-code.net/apps.html>
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ This Yunohost app installs the server part (services + mongo database) needed to
|
|||
- As well any documents or images uploaded by users will be backed up
|
||||
|
||||
|
||||
**Version incluse :** 0.3.1~ynh1
|
||||
**Version incluse :** 0.3.1~ynh2
|
||||
|
||||
**Démo :** <https://dont-code.net/apps.html>
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ This Yunohost app installs the server part (services + mongo database) needed to
|
|||
- As well any documents or images uploaded by users will be backed up
|
||||
|
||||
|
||||
**Versión proporcionada:** 0.3.1~ynh1
|
||||
**Versión proporcionada:** 0.3.1~ynh2
|
||||
|
||||
**Demo:** <https://dont-code.net/apps.html>
|
||||
|
||||
|
|
|
@ -2,6 +2,15 @@
|
|||
|
||||
location __PATH__/ {
|
||||
|
||||
# CORS support
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
|
||||
# Handling preflight requests
|
||||
if ($request_method = OPTIONS) {
|
||||
add_header Access-Control-Allow-Methods *;
|
||||
add_header Access-Control-Allow-Headers *;
|
||||
}
|
||||
|
||||
# Path to source
|
||||
alias __DATA_DIR__/;
|
||||
|
||||
|
|
56
conf/repository-next.json
Normal file
56
conf/repository-next.json
Normal file
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
"$schema": "https://dont-code.net/schemas/v1/repository-schema.json",
|
||||
"name": "Next Repository __TENANT__",
|
||||
"description": "Repository provided by Dont-code offering next versions of all plugins",
|
||||
"webSocketUrl": "ws://__DOMAIN____PATH__/preview",
|
||||
"storeApiUrl": "https://__DOMAIN____PATH__/data",
|
||||
"projectApiUrl": "https://__DOMAIN____PATH__/project",
|
||||
"documentApiUrl": "https://__DOMAIN____PATH__/documents",
|
||||
"plugins": [
|
||||
{
|
||||
"id": "Basic",
|
||||
"display-name": "Basic plugin for editing entities",
|
||||
"version": "1.0.0",
|
||||
"info": {
|
||||
"remote-entry":"https://dont-code.net/plugins/next/remoteEntry.mjs"
|
||||
},
|
||||
"config": {}
|
||||
},
|
||||
{
|
||||
"id": "Fields",
|
||||
"display-name": "Additional editors for entity properties",
|
||||
"version": "1.0.0",
|
||||
"info": {
|
||||
"remote-entry":"https://dont-code.net/plugins/next/remoteEntry.mjs"
|
||||
},
|
||||
"config": {}
|
||||
},
|
||||
{
|
||||
"id": "Rest",
|
||||
"display-name": "Plugins to support datasources from Rest API",
|
||||
"version": "1.0.0",
|
||||
"info": {
|
||||
"remote-entry":"https://dont-code.net/plugin-rest/next/remoteEntry.mjs"
|
||||
},
|
||||
"config": {}
|
||||
},
|
||||
{
|
||||
"id": "Report",
|
||||
"display-name": "Plugins to generate and display reports",
|
||||
"version": "1.0.0",
|
||||
"info": {
|
||||
"remote-entry":"https://dont-code.net/plugin-report/next/remoteEntry.mjs"
|
||||
},
|
||||
"config": {}
|
||||
},
|
||||
{
|
||||
"id": "Commerce",
|
||||
"display-name": "Plugins to get prices from shops",
|
||||
"version": "1.0.0",
|
||||
"info": {
|
||||
"remote-entry":"https://dont-code.net/plugin-commerce/next/remoteEntry.mjs"
|
||||
},
|
||||
"config": {}
|
||||
}
|
||||
]
|
||||
}
|
56
conf/repository-stable.json
Normal file
56
conf/repository-stable.json
Normal file
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
"$schema": "https://dont-code.net/schemas/v1/repository-schema.json",
|
||||
"name": "Stable Repository __TENANT__",
|
||||
"description": "Repository provided by Dont-code using stable versions of plugins",
|
||||
"webSocketUrl": "ws://__DOMAIN____PATH__/preview",
|
||||
"storeApiUrl": "https://__DOMAIN____PATH__/data",
|
||||
"projectApiUrl": "https://__DOMAIN____PATH__/project",
|
||||
"documentApiUrl": "https://__DOMAIN____PATH__/documents",
|
||||
"plugins": [
|
||||
{
|
||||
"id": "Basic",
|
||||
"display-name": "Basic plugin for editing entities",
|
||||
"version": "1.0.0",
|
||||
"info": {
|
||||
"remote-entry":"https://dont-code.net/plugins/latest/remoteEntry.mjs"
|
||||
},
|
||||
"config": {}
|
||||
},
|
||||
{
|
||||
"id": "Fields",
|
||||
"display-name": "Additional editors for entity properties",
|
||||
"version": "1.0.0",
|
||||
"info": {
|
||||
"remote-entry":"https://dont-code.net/plugins/latest/remoteEntry.mjs"
|
||||
},
|
||||
"config": {}
|
||||
},
|
||||
{
|
||||
"id": "Rest",
|
||||
"display-name": "Plugins to support datasources from Rest API",
|
||||
"version": "1.0.0",
|
||||
"info": {
|
||||
"remote-entry":"https://dont-code.net/plugin-rest/latest/remoteEntry.mjs"
|
||||
},
|
||||
"config": {}
|
||||
},
|
||||
{
|
||||
"id": "Report",
|
||||
"display-name": "Plugins to generate and display reports",
|
||||
"version": "1.0.0",
|
||||
"info": {
|
||||
"remote-entry":"https://dont-code.net/plugin-report/latest/remoteEntry.mjs"
|
||||
},
|
||||
"config": {}
|
||||
},
|
||||
{
|
||||
"id": "Commerce",
|
||||
"display-name": "Plugins to get prices from shops",
|
||||
"version": "1.0.0",
|
||||
"info": {
|
||||
"remote-entry":"https://dont-code.net/plugin-commerce/latest/remoteEntry.mjs"
|
||||
},
|
||||
"config": {}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -7,7 +7,7 @@ name = "Dont-code Services"
|
|||
description.en = "Install services and databases needed to support Dont-code platform"
|
||||
description.fr = "Installe les services et base de données nécessaires pour utiliser la plateforme Dont-code"
|
||||
|
||||
version = "0.3.1~ynh1"
|
||||
version = "0.3.1~ynh2"
|
||||
|
||||
maintainers = ["Dont-code Team"]
|
||||
|
||||
|
|
|
@ -41,6 +41,10 @@ ynh_backup_if_checksum_is_different --file="$install_dir/.env"
|
|||
ynh_replace_string --match_string="$document_url" --replace_string="$new_document_url" --target_file="$install_dir/.env"
|
||||
ynh_store_file_checksum --file="$install_dir/.env"
|
||||
|
||||
# Update the repository pages
|
||||
ynh_add_config --template="repository-next.json" --destination="$data_dir/repository-next.json"
|
||||
ynh_add_config --template="repository-stable.json" --destination="$data_dir/repository-stable.json"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALISATION
|
||||
#=================================================
|
||||
|
|
|
@ -35,9 +35,14 @@ ynh_app_setting_set --app="$app" --key=document_dir --value="$document_dir"
|
|||
document_url=$(append_uri "https://${domain}${path}" "docs")
|
||||
ynh_app_setting_set --app="$app" --key=document_url --value="$document_url"
|
||||
|
||||
# Add the status page
|
||||
# Add the status pageindex
|
||||
ynh_add_config --template="index.html" --destination="$data_dir/index.html"
|
||||
|
||||
# Add the repository pages
|
||||
ynh_add_config --template="repository-next.json" --destination="$data_dir/repository-next.json"
|
||||
ynh_add_config --template="repository-stable.json" --destination="$data_dir/repository-stable.json"
|
||||
|
||||
|
||||
chmod -R o-rwx "$data_dir"
|
||||
chown -R $app:www-data "$data_dir"
|
||||
|
||||
|
|
|
@ -117,6 +117,10 @@ ynh_script_progression --message="Configuring document storage..." --weight=1
|
|||
|
||||
ynh_add_config --template="index.html" --destination="$data_dir/index.html"
|
||||
|
||||
# Add the repository pages
|
||||
ynh_add_config --template="repository-next.json" --destination="$data_dir/repository-next.json"
|
||||
ynh_add_config --template="repository-stable.json" --destination="$data_dir/repository-stable.json"
|
||||
|
||||
chmod -R o-rwx "$data_dir"
|
||||
chown -R "$app:www-data" "$data_dir"
|
||||
|
||||
|
|
Loading…
Reference in a new issue