mirror of
https://github.com/YunoHost-Apps/terraforming-mars_ynh.git
synced 2024-09-03 20:36:05 +02:00
Merge pull request #2 from YunoHost-Apps/testing
upgrade to latest commit
This commit is contained in:
commit
f17ac32172
8 changed files with 58 additions and 139 deletions
67
README.md
67
README.md
|
@ -1,85 +1,48 @@
|
|||
# Packaging an app, starting from this example
|
||||
|
||||
* Copy this app before working on it, using the ['Use this template'](https://github.com/YunoHost/example_ynh/generate) button on the Github repo.
|
||||
* Edit the `manifest.toml` with app specific info.
|
||||
* Edit the `install`, `upgrade`, `remove`, `backup` and `restore` scripts, and any relevant conf files in `conf/`.
|
||||
* Using the [script helpers documentation.](https://yunohost.org/packaging_apps_helpers)
|
||||
* Edit the `change_url` and `config` scripts too, or remove them if you have no use of them
|
||||
* Add a `LICENSE` file for the package. NB: this LICENSE file is not meant to necessarily be the LICENSE of the upstream app - it is only the LICENSE you want this package's code to published with ;). We recommend to use [the AGPL-3](https://www.gnu.org/licenses/agpl-3.0.txt).
|
||||
* Edit `doc/DISCLAIMER*.md`
|
||||
* The `README.md` files are to be automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
|
||||
|
||||
---
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
# Example app for YunoHost
|
||||
# Terraforming Mars for YunoHost
|
||||
|
||||
[![Integration level](https://dash.yunohost.org/integration/example.svg)](https://dash.yunohost.org/appci/app/example) ![Working status](https://ci-apps.yunohost.org/ci/badges/example.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/example.maintain.svg)
|
||||
[![Install Example app with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=example)
|
||||
[![Integration level](https://dash.yunohost.org/integration/terraforming-mars.svg)](https://dash.yunohost.org/appci/app/terraforming-mars) ![Working status](https://ci-apps.yunohost.org/ci/badges/terraforming-mars.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/terraforming-mars.maintain.svg)
|
||||
|
||||
[![Install Terraforming Mars with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=terraforming-mars)
|
||||
|
||||
*[Lire ce readme en français.](./README_fr.md)*
|
||||
|
||||
> *This package allows you to install Example app quickly and simply on a YunoHost server.
|
||||
> *This package allows you to install Terraforming Mars 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
|
||||
|
||||
Some long and extensive description of what the app is and does, lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
||||
|
||||
### Features
|
||||
|
||||
- Ut enim ad minim veniam, quis nostrud exercitation ullamco ;
|
||||
- Laboris nisi ut aliquip ex ea commodo consequat ;
|
||||
- Duis aute irure dolor in reprehenderit in voluptate ;
|
||||
- Velit esse cillum dolore eu fugiat nulla pariatur ;
|
||||
- Excepteur sint occaecat cupidatat non proident, sunt in culpa."
|
||||
This is an open-source online implementation of the great board game Terraforming mars. It is not affiliated with FryxGames, Asmodee Digital or Steam in any way.
|
||||
|
||||
|
||||
**Shipped version:** 1.0~ynh1
|
||||
**Shipped version:** 20231103~ynh1
|
||||
|
||||
**Demo:** https://demo.example.com
|
||||
**Demo:** https://terraforming-mars.herokuapp.com/
|
||||
|
||||
## Screenshots
|
||||
|
||||
![Screenshot of Example app](./doc/screenshots/example.jpg)
|
||||
|
||||
## Disclaimers / important information
|
||||
|
||||
* Any known limitations, constrains or stuff not working, such as (but not limited to):
|
||||
* requiring a full dedicated domain ?
|
||||
* architectures not supported ?
|
||||
* not-working single-sign on or LDAP integration ?
|
||||
* the app requires an important amount of RAM / disk / .. to install or to work properly
|
||||
* etc...
|
||||
|
||||
* Other infos that people should be aware of, such as:
|
||||
* any specific step to perform after installing (such as manually finishing the install, specific admin credentials, ...)
|
||||
* how to configure / administrate the application if it ain't obvious
|
||||
* upgrade process / specificities / things to be aware of ?
|
||||
* security considerations ?
|
||||
![Screenshot of Terraforming Mars ](./doc/screenshots/screenshot.png)
|
||||
|
||||
## Documentation and resources
|
||||
|
||||
* Official app website: <https://example.com>
|
||||
* Official user documentation: <https://yunohost.org/apps>
|
||||
* Official admin documentation: <https://yunohost.org/packaging_apps>
|
||||
* Upstream app code repository: <https://some.forge.com/example/example>
|
||||
* YunoHost documentation for this app: <https://yunohost.org/app_example>
|
||||
* Report a bug: <https://github.com/YunoHost-Apps/example_ynh/issues>
|
||||
* Upstream app code repository: <https://github.com/terraforming-mars/terraforming-mars>
|
||||
* YunoHost Store: <https://apps.yunohost.org/app/terraforming-mars>
|
||||
* Report a bug: <https://github.com/YunoHost-Apps/terraforming-mars_ynh/issues>
|
||||
|
||||
## Developer info
|
||||
|
||||
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/example_ynh/tree/testing).
|
||||
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/terraforming-mars_ynh/tree/testing).
|
||||
|
||||
To try the testing branch, please proceed like that.
|
||||
|
||||
``` bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/example_ynh/tree/testing --debug
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/terraforming-mars_ynh/tree/testing --debug
|
||||
or
|
||||
sudo yunohost app upgrade example -u https://github.com/YunoHost-Apps/example_ynh/tree/testing --debug
|
||||
sudo yunohost app upgrade terraforming-mars -u https://github.com/YunoHost-Apps/terraforming-mars_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**More info regarding app packaging:** <https://yunohost.org/packaging_apps>
|
||||
|
|
64
README_fr.md
64
README_fr.md
|
@ -3,71 +3,45 @@ N.B.: This README was automatically generated by https://github.com/YunoHost/app
|
|||
It shall NOT be edited by hand.
|
||||
-->
|
||||
|
||||
# Exemple d'app pour YunoHost
|
||||
# Terraforming Mars pour YunoHost
|
||||
|
||||
[![Niveau d'intégration](https://dash.yunohost.org/integration/example.svg)](https://dash.yunohost.org/appci/app/example) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/example.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/example.maintain.svg)
|
||||
[![Installer Example app avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=example)
|
||||
[![Niveau d’intégration](https://dash.yunohost.org/integration/terraforming-mars.svg)](https://dash.yunohost.org/appci/app/terraforming-mars) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/terraforming-mars.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/terraforming-mars.maintain.svg)
|
||||
|
||||
[![Installer Terraforming Mars avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=terraforming-mars)
|
||||
|
||||
*[Read this readme in english.](./README.md)*
|
||||
|
||||
> *Ce package vous permet d'installer Example app 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.*
|
||||
> *Ce package vous permet d’installer Terraforming Mars 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
|
||||
## Vue d’ensemble
|
||||
|
||||
Some long and extensive description of what the app is and does, lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
||||
Cette application est une implémentation en ligne et open source de l’excellent jeu de plateau Terraforming mars. Elle n’est affiliée à FryxGames, Asmodee Digital ou Steam en aucun cas.
|
||||
|
||||
### Features
|
||||
**Version incluse :** 20231103~ynh1
|
||||
|
||||
- Ut enim ad minim veniam, quis nostrud exercitation ullamco ;
|
||||
- Laboris nisi ut aliquip ex ea commodo consequat ;
|
||||
- Duis aute irure dolor in reprehenderit in voluptate ;
|
||||
- Velit esse cillum dolore eu fugiat nulla pariatur ;
|
||||
- Excepteur sint occaecat cupidatat non proident, sunt in culpa."
|
||||
**Démo :** https://terraforming-mars.herokuapp.com/
|
||||
|
||||
## Captures d’écran
|
||||
|
||||
**Version incluse :** 1.0~ynh1
|
||||
|
||||
**Démo :** https://demo.example.com
|
||||
|
||||
## Captures d'écran
|
||||
|
||||
![Capture d'écran de Example app](./doc/screenshots/example.jpg)
|
||||
|
||||
## Avertissements / informations importantes
|
||||
|
||||
* Any known limitations, constrains or stuff not working, such as (but not limited to):
|
||||
* requiring a full dedicated domain ?
|
||||
* architectures not supported ?
|
||||
* not-working single-sign on or LDAP integration ?
|
||||
* the app requires an important amount of RAM / disk / .. to install or to work properly
|
||||
* etc...
|
||||
|
||||
* Other infos that people should be aware of, such as:
|
||||
* any specific step to perform after installing (such as manually finishing the install, specific admin credentials, ...)
|
||||
* how to configure / administrate the application if it ain't obvious
|
||||
* upgrade process / specificities / things to be aware of ?
|
||||
* security considerations ?
|
||||
![Capture d’écran de Terraforming Mars ](./doc/screenshots/screenshot.png)
|
||||
|
||||
## Documentations et ressources
|
||||
|
||||
* Site officiel de l'app : <https://example.com>
|
||||
* Documentation officielle utilisateur : <https://yunohost.org/apps>
|
||||
* Documentation officielle de l'admin : <https://yunohost.org/packaging_apps>
|
||||
* Dépôt de code officiel de l'app : <https://some.forge.com/example/example>
|
||||
* Documentation YunoHost pour cette app : <https://yunohost.org/app_example>
|
||||
* Signaler un bug : <https://github.com/YunoHost-Apps/example_ynh/issues>
|
||||
* Dépôt de code officiel de l’app : <https://github.com/terraforming-mars/terraforming-mars>
|
||||
* YunoHost Store: <https://apps.yunohost.org/app/terraforming-mars>
|
||||
* Signaler un bug : <https://github.com/YunoHost-Apps/terraforming-mars_ynh/issues>
|
||||
|
||||
## Informations pour les développeurs
|
||||
|
||||
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/example_ynh/tree/testing).
|
||||
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/terraforming-mars_ynh/tree/testing).
|
||||
|
||||
Pour essayer la branche testing, procédez comme suit.
|
||||
|
||||
``` bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/example_ynh/tree/testing --debug
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/terraforming-mars_ynh/tree/testing --debug
|
||||
ou
|
||||
sudo yunohost app upgrade example -u https://github.com/YunoHost-Apps/example_ynh/tree/testing --debug
|
||||
sudo yunohost app upgrade terraforming-mars -u https://github.com/YunoHost-Apps/terraforming-mars_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**Plus d'infos sur le packaging d'applications :** <https://yunohost.org/packaging_apps>
|
||||
**Plus d’infos sur le packaging d’applications :** <https://yunohost.org/packaging_apps>
|
|
@ -11,7 +11,7 @@ WorkingDirectory=__INSTALL_DIR__/terraforming-mars
|
|||
EnvironmentFile=__INSTALL_DIR__/.env
|
||||
Environment="__YNH_NODE_LOAD_PATH__"
|
||||
Environment=NODE_ENV=production
|
||||
ExecStart=__YNH_NPM__ run start
|
||||
ExecStart=__YNH_NODE__ __YNH_NPM__ run start
|
||||
StandardOutput=append:/var/log/__APP__/__APP__.log
|
||||
StandardError=inherit
|
||||
Restart=on-failure
|
||||
|
|
|
@ -7,7 +7,7 @@ name = "Terraforming Mars "
|
|||
description.en = "Open-source online implementation of the great board game Terraforming mars."
|
||||
description.fr = "Implementation en ligne à code source ouvert de l’excellent jeu de plateau Terraforming Mars"
|
||||
|
||||
version = "20231029~ynh1"
|
||||
version = "20231103~ynh1"
|
||||
|
||||
maintainers = ["Thovi98"]
|
||||
|
||||
|
@ -46,8 +46,6 @@ ram.runtime = "50M"
|
|||
|
||||
[resources.install_dir]
|
||||
|
||||
[resources.data_dir]
|
||||
|
||||
[resources.permissions]
|
||||
|
||||
main.url = "/"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
nodejs_version=16
|
||||
|
||||
# Terraforming-mars commit
|
||||
TM_version="a36d327"
|
||||
TM_version="7e36410"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
|
|
|
@ -21,12 +21,6 @@ ynh_print_info --message="Declaring files to be backed up..."
|
|||
|
||||
ynh_backup --src_path="$install_dir"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE DATA DIR
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="$data_dir" --is_big
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -39,7 +33,7 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|||
# BACKUP LOGROTATE
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="/etc/logrotate.d/$app"
|
||||
ynh_backup --src_path="/var/log/$app"
|
||||
|
||||
#=================================================
|
||||
# BACKUP SYSTEMD
|
||||
|
@ -51,4 +45,4 @@ ynh_backup --src_path="/etc/systemd/system/$app.service"
|
|||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|
||||
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|
||||
|
|
|
@ -30,19 +30,6 @@ chmod 750 "$install_dir"
|
|||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE DATA DIRECTORY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the data directory..." --weight=1
|
||||
|
||||
ynh_restore_file --origin_path="$data_dir" --not_mandatory
|
||||
|
||||
mkdir -p $data_dir
|
||||
|
||||
chmod 750 "$data_dir"
|
||||
chmod -R o-rwx "$data_dir"
|
||||
chown -R $app:www-data "$data_dir"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
#=================================================
|
||||
|
@ -53,6 +40,9 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=10
|
|||
# Define and install dependencies
|
||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||
|
||||
# Upgrade NPM
|
||||
ynh_npm install --global npm@6.14.18
|
||||
|
||||
#=================================================
|
||||
# RESTORE SYSTEMD
|
||||
#=================================================
|
||||
|
@ -68,7 +58,7 @@ ynh_script_progression --message="Restoring the logrotate configuration..." --we
|
|||
|
||||
mkdir -p "/var/log/$app"
|
||||
chown -R $app: "/var/log/$app"
|
||||
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
||||
ynh_restore_file --origin_path="/var/log/$app"
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
|
@ -84,7 +74,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1
|
|||
|
||||
ynh_exec_warn_less ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match=""
|
||||
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
|
@ -35,8 +35,9 @@ ynh_npm install --global npm@6.14.18
|
|||
#=================================================
|
||||
ynh_script_progression --message="Building app... This may take quiete some time" --weight=30
|
||||
|
||||
ynh_secure_remove $install_dir/terraforming-mars
|
||||
|
||||
cd $install_dir
|
||||
ynh_secure_remove terraforming-mars
|
||||
ynh_exec_warn_less git clone https://github.com/terraforming-mars/terraforming-mars.git
|
||||
|
||||
cd $install_dir/terraforming-mars
|
||||
|
@ -56,6 +57,18 @@ chmod 750 "$install_dir"
|
|||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:$app "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...)
|
||||
#=================================================
|
||||
# UPDATE A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating a configuration file..." --weight=1
|
||||
|
||||
ynh_add_config --template="../conf/.env" --destination="$install_dir/.env"
|
||||
|
||||
chmod 600 "$install_dir/.env"
|
||||
chown $app:$app "$install_dir/.env"
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
|
@ -83,22 +96,10 @@ ynh_script_progression --message="Integrating service in YunoHost..."
|
|||
|
||||
yunohost service add $app --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...)
|
||||
#=================================================
|
||||
# UPDATE A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating a configuration file..." --weight=1
|
||||
|
||||
ynh_add_config --template="../conf/.env" --destination="$install_dir/.env"
|
||||
|
||||
chmod 600 "$install_dir/.env"
|
||||
chown $app:$app "$install_dir/.env"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
ynh_script_progression --message="Starting a systemd service..."
|
||||
|
||||
ynh_exec_warn_less ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match=""
|
||||
|
||||
|
|
Loading…
Reference in a new issue