mirror of
https://github.com/YunoHost-Apps/redmine_ynh.git
synced 2024-09-03 20:16:16 +02:00
Fix
This commit is contained in:
parent
d01a7cb85a
commit
6786cbd02c
11 changed files with 95 additions and 98 deletions
71
README.md
71
README.md
|
@ -1,14 +1,27 @@
|
||||||
# Redmine app for YunoHost
|
# Redmine for YunoHost
|
||||||
|
|
||||||
**Shipped version:** 4.0.4
|
[](https://dash.yunohost.org/appci/app/redmine)  
|
||||||
|
[](https://install-app.yunohost.org/?app=redmine)
|
||||||
|
|
||||||
- [Yunohost project](https://yunohost.org)
|
*[Lire ce readme en français.](./README_fr.md)*
|
||||||
- [Redmine website](https://www.redmine.org/)
|
|
||||||
|
|
||||||

|
> *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.
|
||||||
|
|
||||||
[](https://install-app.yunohost.org/?app=redmine)
|
**Shipped version:** 4.1.1
|
||||||
|
|
||||||
|
## Screenshots
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Demo
|
||||||
|
|
||||||
|
* [Official demo](Link to a demo site for this app.)
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
### Installing guide
|
### Installing guide
|
||||||
|
|
||||||
|
@ -20,7 +33,47 @@
|
||||||
|
|
||||||
1. Login in redmine with admin / admin
|
1. Login in redmine with admin / admin
|
||||||
|
|
||||||
|
## Documentation
|
||||||
### Upgrade this package:
|
|
||||||
|
|
||||||
$ sudo yunohost app upgrade redmine -u https://github.com/YunoHost-Apps/redmine_ynh
|
* Official documentation: Link to the official documentation of this app
|
||||||
|
* YunoHost documentation: If specific documentation is needed, feel free to contribute.
|
||||||
|
|
||||||
|
## YunoHost specific features
|
||||||
|
|
||||||
|
#### Multi-user support
|
||||||
|
|
||||||
|
Are LDAP and HTTP auth supported?
|
||||||
|
Can the app be used by multiple users?
|
||||||
|
|
||||||
|
#### Supported architectures
|
||||||
|
|
||||||
|
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/redmine/)
|
||||||
|
* ARMv8-A - [](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
|
||||||
|
```
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
domain="domain.tld" (DOMAIN)
|
domain="domain.tld" (DOMAIN)
|
||||||
path="/" (PATH)
|
path="/" (PATH)
|
||||||
is_public=1 (PUBLIC|public=1|private=0)
|
is_public=1 (PUBLIC|public=1|private=0)
|
||||||
# password="pass"
|
|
||||||
# nextclouddomain="domain.tld"
|
|
||||||
port="9980" (PORT)
|
port="9980" (PORT)
|
||||||
; Checks
|
; Checks
|
||||||
pkg_linter=1
|
pkg_linter=1
|
||||||
|
@ -21,22 +19,8 @@
|
||||||
upgrade=1
|
upgrade=1
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
incorrect_path=1
|
|
||||||
port_already_use=0
|
port_already_use=0
|
||||||
change_url=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
|
;;; Options
|
||||||
Email=
|
Email=
|
||||||
Notification=none
|
Notification=none
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
SOURCE_URL=http://www.redmine.org/releases/redmine-4.0.4.tar.gz
|
SOURCE_URL=https://www.redmine.org/releases/redmine-4.1.1.tar.gz
|
||||||
SOURCE_SUM=61775c1cc5d373676d1610c344e828ecc7c9e63e2e517908ebfaa19a42bc12dc4677c8aa5f49b288d0a716a8705bcb66b2ee228b9f0d22c56cbd68f6e1072c4f
|
SOURCE_SUM=05faafe764330f2d77b0aacddf9d8ddce579c3d26bb8e03a7d6e7ff461f1cdda
|
||||||
SOURCE_SUM_PRG=sha512sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
SOURCE_EXTRACT=true
|
SOURCE_EXTRACT=true
|
||||||
|
|
|
@ -3,7 +3,7 @@ location __PATH__/ {
|
||||||
# Path to source
|
# Path to source
|
||||||
# alias __FINALPATH__/ ;
|
# alias __FINALPATH__/ ;
|
||||||
|
|
||||||
proxy_pass http://127.0.0.1:3000/;
|
proxy_pass http://127.0.0.1:__PORT__/;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
|
|
@ -5,8 +5,8 @@ Requires=postgresql.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User=root
|
User=__APP__
|
||||||
Group=users
|
Group=__APP__
|
||||||
WorkingDirectory=/opt/redmine
|
WorkingDirectory=/opt/redmine
|
||||||
Environment=RAILS_SERVE_STATIC_FILES=true
|
Environment=RAILS_SERVE_STATIC_FILES=true
|
||||||
ExecStart=/bin/bash -c "/opt/redmine/bin/rails s -e production -b 127.0.0.1 -p 3000"
|
ExecStart=/bin/bash -c "/opt/redmine/bin/rails s -e production -b 127.0.0.1 -p 3000"
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
"id": "redmine",
|
"id": "redmine",
|
||||||
"packaging_format": 1,
|
"packaging_format": 1,
|
||||||
"description": {
|
"description": {
|
||||||
"en": "A flexible project management web application.",
|
"en": "Flexible project management web application.",
|
||||||
"fr": "Un gestionnaire de projet flexible sous forme d'application web."
|
"fr": "Gestionnaire de projet flexible sous forme d'application web."
|
||||||
},
|
},
|
||||||
"version": "4.0.2",
|
"version": "4.1.1",
|
||||||
"url": "https://www.redmine.org/",
|
"url": "https://www.redmine.org/",
|
||||||
"license": "GPL-2.0",
|
"license": "GPL-2.0",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
@ -14,13 +14,11 @@
|
||||||
"email": "liberodark@gmail.com"
|
"email": "liberodark@gmail.com"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 2.7.2"
|
"yunohost": ">= 3.8.1"
|
||||||
},
|
},
|
||||||
"multi_instance": false,
|
"multi_instance": false,
|
||||||
"services": [
|
"services": [
|
||||||
"nginx",
|
"nginx"
|
||||||
"php5-fpm",
|
|
||||||
"mysql"
|
|
||||||
],
|
],
|
||||||
"arguments": {
|
"arguments": {
|
||||||
"install": [{
|
"install": [{
|
||||||
|
@ -48,10 +46,10 @@
|
||||||
"name": "is_public",
|
"name": "is_public",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"ask": {
|
"ask": {
|
||||||
"en": "Is it a public site ?",
|
"en": "Is it a public site?",
|
||||||
"fr": "Est-ce un site public ?"
|
"fr": "Est-ce un site public ?"
|
||||||
},
|
},
|
||||||
"default": "true"
|
"default": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,6 @@ source /usr/share/yunohost/helpers
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_clean_setup () {
|
ynh_clean_setup () {
|
||||||
### Remove this function if there's nothing to clean before calling the remove script.
|
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
# Exit if an error occurs during the execution of the script
|
# Exit if an error occurs during the execution of the script
|
||||||
|
@ -23,6 +22,7 @@ ynh_abort_if_errors
|
||||||
#=================================================
|
#=================================================
|
||||||
# LOAD SETTINGS
|
# LOAD SETTINGS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_print_info --message="Loading installation settings..."
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
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)
|
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
|
# BACKUP THE APP MAIN DIR
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_backup "$final_path"
|
ynh_backup --src_path="$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE NGINX CONFIGURATION
|
# 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_psql_dump_db --database="$db_name" > db.sql
|
||||||
ynh_backup "db.sql"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC BACKUP
|
# END OF SCRIPT
|
||||||
#=================================================
|
|
||||||
# BACKUP THE CRON FILE
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
#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)."
|
||||||
|
|
|
@ -29,24 +29,12 @@ domain=$YNH_APP_ARG_DOMAIN
|
||||||
path_url=$YNH_APP_ARG_PATH
|
path_url=$YNH_APP_ARG_PATH
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
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
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
# 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
|
final_path=/opt/$app
|
||||||
test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
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
|
### - Remove the section "CLOSE A PORT" in the remove script
|
||||||
|
|
||||||
# Find a free port
|
# Find a free port
|
||||||
#port=$(ynh_find_port 3000)
|
port=$(ynh_find_port 3000)
|
||||||
|
|
||||||
# Open this port
|
# Open this port
|
||||||
#yunohost firewall allow --no-upnp TCP $port 2>&1
|
#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
|
# INSTALL DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_print_info "Installing dependencies..."
|
ynh_print_info "Installing dependencies..."
|
||||||
|
|
||||||
### `ynh_install_app_dependencies` allows you to add any "apt" dependencies to the package.
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
### 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_print_info "Installing Rails & Bunlder..."
|
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..."
|
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_name=$(ynh_sanitize_dbid $app)
|
||||||
db_pwd=$(ynh_string_random 8)
|
db_pwd=$(ynh_string_random 8)
|
||||||
ynh_app_setting_set $app db_name $db_name
|
ynh_app_setting_set $app db_name $db_name
|
||||||
|
|
|
@ -91,16 +91,6 @@ ynh_print_info "Removing logrotate configuration"
|
||||||
# Remove the app-specific logrotate config
|
# Remove the app-specific logrotate config
|
||||||
ynh_remove_logrotate
|
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
|
# SPECIFIC REMOVE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -85,7 +85,7 @@ chown -R $app: $final_path
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Define and install dependencies
|
# 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..."
|
ynh_print_info "Installing Rails & Bunlder..."
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@ ynh_print_info "Loading installation settings..."
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
|
|
||||||
domain=$(ynh_app_setting_get $app domain)
|
domain=$(ynh_app_setting_get $app domain)
|
||||||
path_url=$(ynh_app_setting_get $app path)
|
path_url=$(ynh_app_setting_get $app path)
|
||||||
admin=$(ynh_app_setting_get $app admin)
|
admin=$(ynh_app_setting_get $app admin)
|
||||||
|
@ -169,12 +168,12 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# 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
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_print_info "Upgrade of $app completed"
|
ynh_script_progression --message="Upgrade of $app completed" --time --last
|
||||||
|
|
Loading…
Add table
Reference in a new issue