1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/redmine_ynh.git synced 2024-09-03 20:16:16 +02:00
This commit is contained in:
ericgaspar 2020-12-22 23:53:01 +01:00
parent d01a7cb85a
commit 6786cbd02c
No known key found for this signature in database
GPG key ID: 574F281483054D44
11 changed files with 95 additions and 98 deletions

View file

@ -1,14 +1,27 @@
# Redmine app for YunoHost
# Redmine for YunoHost
**Shipped version:** 4.0.4
[![Integration level](https://dash.yunohost.org/integration/redmine.svg)](https://dash.yunohost.org/appci/app/redmine) ![](https://ci-apps.yunohost.org/ci/badges/redmine.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/redmine.maintain.svg)
[![Install Redmine with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=redmine)
- [Yunohost project](https://yunohost.org)
- [Redmine website](https://www.redmine.org/)
*[Lire ce readme en français.](./README_fr.md)*
![](https://dudodiprj2sv7.cloudfront.net/product-logos/ck/rN/L1BJGTE8HK3O-180x180.PNG)
> *This package allows you to install Redmine 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
Quick description of this app.
[![Install Redmine with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=redmine)
**Shipped version:** 4.1.1
## Screenshots
![](https://www.redmine.org/screenshots/issue_list.png)
## Demo
* [Official demo](Link to a demo site for this app.)
## Configuration
### Installing guide
@ -20,7 +33,47 @@
1. Login in redmine with admin / admin
## Documentation
### Upgrade this package:
* Official documentation: Link to the official documentation of this app
* YunoHost documentation: If specific documentation is needed, feel free to contribute.
$ sudo yunohost app upgrade redmine -u https://github.com/YunoHost-Apps/redmine_ynh
## YunoHost specific features
#### Multi-user support
Are LDAP and HTTP auth supported?
Can the app be used by multiple users?
#### Supported architectures
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/redmine%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/redmine/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/Rredmine%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/redmine/)
## Limitations
* Any known limitations.
## Additional information
* Other info you would like to add about this app.
## Links
* Report a bug: https://github.com/YunoHost-Apps/redmine_ynh/issues
* App website: https://www.redmine.org/
* Upstream app repository: Link to the official repository of the upstream app.
* YunoHost website: https://yunohost.org/
---
## Developer info
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/redmine_ynh/tree/testing).
To try the testing branch, please proceed like that.
```
sudo yunohost app install https://github.com/YunoHost-Apps/redmine_ynh/tree/testing --debug
or
sudo yunohost app upgrade redmine -u https://github.com/YunoHost-Apps/redmine_ynh/tree/testing --debug
```

View file

@ -8,8 +8,6 @@
domain="domain.tld" (DOMAIN)
path="/" (PATH)
is_public=1 (PUBLIC|public=1|private=0)
# password="pass"
# nextclouddomain="domain.tld"
port="9980" (PORT)
; Checks
pkg_linter=1
@ -21,22 +19,8 @@
upgrade=1
backup_restore=1
multi_instance=1
incorrect_path=1
port_already_use=0
change_url=0
;;; Levels
Level 1=auto
Level 2=auto
Level 3=auto
# Level 4:
Level 4=1 (This app supports the Nextcloud LDAP auth)
# Level 5:
Level 5=auto
Level 6=auto
Level 7=auto
Level 8=0
Level 9=0
Level 10=0
;;; Options
Email=
Notification=none

View file

@ -1,6 +1,6 @@
SOURCE_URL=http://www.redmine.org/releases/redmine-4.0.4.tar.gz
SOURCE_SUM=61775c1cc5d373676d1610c344e828ecc7c9e63e2e517908ebfaa19a42bc12dc4677c8aa5f49b288d0a716a8705bcb66b2ee228b9f0d22c56cbd68f6e1072c4f
SOURCE_SUM_PRG=sha512sum
SOURCE_URL=https://www.redmine.org/releases/redmine-4.1.1.tar.gz
SOURCE_SUM=05faafe764330f2d77b0aacddf9d8ddce579c3d26bb8e03a7d6e7ff461f1cdda
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true
SOURCE_EXTRACT=true

View file

@ -3,7 +3,7 @@ location __PATH__/ {
# Path to source
# alias __FINALPATH__/ ;
proxy_pass http://127.0.0.1:3000/;
proxy_pass http://127.0.0.1:__PORT__/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;

View file

@ -5,8 +5,8 @@ Requires=postgresql.service
[Service]
Type=simple
User=root
Group=users
User=__APP__
Group=__APP__
WorkingDirectory=/opt/redmine
Environment=RAILS_SERVE_STATIC_FILES=true
ExecStart=/bin/bash -c "/opt/redmine/bin/rails s -e production -b 127.0.0.1 -p 3000"

View file

@ -3,10 +3,10 @@
"id": "redmine",
"packaging_format": 1,
"description": {
"en": "A flexible project management web application.",
"fr": "Un gestionnaire de projet flexible sous forme d'application web."
"en": "Flexible project management web application.",
"fr": "Gestionnaire de projet flexible sous forme d'application web."
},
"version": "4.0.2",
"version": "4.1.1",
"url": "https://www.redmine.org/",
"license": "GPL-2.0",
"maintainer": {
@ -14,13 +14,11 @@
"email": "liberodark@gmail.com"
},
"requirements": {
"yunohost": ">= 2.7.2"
"yunohost": ">= 3.8.1"
},
"multi_instance": false,
"services": [
"nginx",
"php5-fpm",
"mysql"
"nginx"
],
"arguments": {
"install": [{
@ -51,7 +49,7 @@
"en": "Is it a public site?",
"fr": "Est-ce un site public ?"
},
"default": "true"
"default": true
}
]
}

View file

@ -14,7 +14,6 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_clean_setup () {
### Remove this function if there's nothing to clean before calling the remove script.
true
}
# Exit if an error occurs during the execution of the script
@ -23,6 +22,7 @@ ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================
ynh_print_info --message="Loading installation settings..."
app=$YNH_APP_INSTANCE_NAME
@ -31,30 +31,31 @@ domain=$(ynh_app_setting_get $app domain)
db_name=$(ynh_app_setting_get $app psql_db)
#=================================================
# STANDARD BACKUP STEPS
# DECLARE DATA AND CONF FILES TO BACKUP
#=================================================
ynh_print_info --message="Declaring files to be backed up..."
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================
ynh_backup "$final_path"
ynh_backup --src_path="$final_path"
#=================================================
# BACKUP THE NGINX CONFIGURATION
#=================================================
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP THE PSQL DATABASE
# BACKUP THE MYSQL DATABASE
#=================================================
ynh_print_info --message="Backing up the MySQL database..."
ynh_psql_dump_db "$db_name" > db.sql
ynh_backup "db.sql"
ynh_psql_dump_db --database="$db_name" > db.sql
#=================================================
# SPECIFIC BACKUP
#=================================================
# BACKUP THE CRON FILE
# END OF SCRIPT
#=================================================
#ynh_backup "/etc/cron.d/$app"
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."

View file

@ -29,24 +29,12 @@ domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH
is_public=$YNH_APP_ARG_IS_PUBLIC
### If it's a multi-instance app, meaning it can be installed several times independently
### The id of the app as stated in the manifest is available as $YNH_APP_ID
### The instance number is available as $YNH_APP_INSTANCE_NUMBER (equals "1", "2", ...)
### The app instance name is available as $YNH_APP_INSTANCE_NAME
### - the first time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample
### - the second time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample__2
### - ynhexample__{N} for the subsequent installations, with N=3,4, ...
### The app instance name is probably what interests you most, since this is
### guaranteed to be unique. This is a good unique identifier to define installation path,
### db names, ...
app=$YNH_APP_INSTANCE_NAME
#=================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
#=================================================
### If the app uses nginx as web server (written in HTML/PHP in most cases), the final path should be "/var/www/$app".
### If the app provides an internal web server (or uses another application server such as uwsgi), the final path should be "/opt/yunohost/$app"
final_path=/opt/$app
test ! -e "$final_path" || ynh_die "This path already contains a folder"
@ -77,25 +65,18 @@ ynh_app_setting_set $app is_public $is_public
### - Remove the section "CLOSE A PORT" in the remove script
# Find a free port
#port=$(ynh_find_port 3000)
port=$(ynh_find_port 3000)
# Open this port
#yunohost firewall allow --no-upnp TCP $port 2>&1
#ynh_app_setting_set $app port $port
ynh_app_setting_set $app port $port
#=================================================
# INSTALL DEPENDENCIES
#=================================================
ynh_print_info "Installing dependencies..."
### `ynh_install_app_dependencies` allows you to add any "apt" dependencies to the package.
### Those deb packages will be installed as dependencies of this package.
### If you're not using this helper:
### - Remove the section "REMOVE DEPENDENCIES" in the remove script
### - As well as the section "REINSTALL DEPENDENCIES" in the restore script
### - And the section "UPGRADE DEPENDENCIES" in the upgrade script
ynh_install_app_dependencies postgresql ruby-dev zlib1g-dev libpq-dev
ynh_install_app_dependencies $pkg_dependencies
ynh_print_info "Installing Rails & Bunlder..."
@ -106,15 +87,6 @@ gem install rails:5.2.2 bundler:2.0.1
#=================================================
ynh_print_info "Creating a PostgreSQL database..."
### Use these lines if you need a database for the application.
### `ynh_mysql_setup_db` will create a database, an associated user and a ramdom password.
### The password will be stored as 'mysqlpwd' into the app settings,
### and will be available as $db_pwd
### If you're not using these lines:
### - Remove the section "BACKUP THE POSTGRESQL DATABASE" in the backup script
### - Remove also the section "REMOVE THE POSTGRESQL DATABASE" in the remove script
### - As well as the section "RESTORE THE POSTGRESQL DATABASE" in the restore script
db_name=$(ynh_sanitize_dbid $app)
db_pwd=$(ynh_string_random 8)
ynh_app_setting_set $app db_name $db_name

View file

@ -91,16 +91,6 @@ ynh_print_info "Removing logrotate configuration"
# Remove the app-specific logrotate config
ynh_remove_logrotate
#=================================================
# CLOSE A PORT
#=================================================
if yunohost firewall list | grep -q "\- $port$"
then
ynh_print_info "Closing port $port"
ynh_exec_warn_less yunohost firewall disallow TCP $port
fi
#=================================================
# SPECIFIC REMOVE
#=================================================

View file

@ -85,7 +85,7 @@ chown -R $app: $final_path
#=================================================
# Define and install dependencies
ynh_install_app_dependencies postgresql ruby-dev zlib1g-dev libpq-dev
ynh_install_app_dependencies $pkg_dependencies
ynh_print_info "Installing Rails & Bunlder..."

View file

@ -15,7 +15,6 @@ ynh_print_info "Loading installation settings..."
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain)
path_url=$(ynh_app_setting_get $app path)
admin=$(ynh_app_setting_get $app admin)
@ -169,12 +168,12 @@ fi
#=================================================
# RELOAD NGINX
#=================================================
ynh_print_info "Reloading nginx web server..."
ynh_script_progression --message="Reloading NGINX web server..." --time --weight=1
systemctl reload nginx
ynh_systemd_action --service_name=nginx --action=reload
#=================================================
# END OF SCRIPT
#=================================================
ynh_print_info "Upgrade of $app completed"
ynh_script_progression --message="Upgrade of $app completed" --time --last