Skip to content

Commit

Permalink
Merge pull request #13 from YunoHost-Apps/enh_refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
JimboJoe committed Aug 23, 2020
2 parents e837152 + 12680d1 commit 6fd9423
Show file tree
Hide file tree
Showing 17 changed files with 936 additions and 433 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Changelog
=========

## Unreleased
- Nothing for now...

## [2.3.18~ynh1](https://github.com/YunoHost-Apps/cachet_ynh/pull/13) - 2020-05-21

#### Added
* Add changelog
* Add issue template

#### Fixed
* fix buster support

#### Changed
* Use latest packaging guidelines
125 changes: 78 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,78 @@
Cachet for YunoHost
------------------------
[![Install Cachet with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=cachet)

[![Integration level](https://dash.yunohost.org/integration/cachet.svg)](https://ci-apps.yunohost.org/jenkins/job/cachet%20%28Community%29/lastBuild/consoleFull)

This is a [Cachet](https://cachethq.io/) package for YunoHost.

![](https://github.com/CachetHQ/Assets/raw/master/images/logo/Cachet.png)

---

**Shipped version:** 2.3.18

[Cachet](https://cachethq.io/) is a free, open source status page for your API, service or company. Built with all of the features that you'd expect from a status page, Cachet comes with a powerful API, a metric system, multiple user support, two factor authentication for added security and is easy to get setup. A powerful, self-hosted alternative to StatusPage.io and Status.io.


![](https://github.com/CachetHQ/Assets/raw/master/screenshots/main-interface.png)

## Features

- List your service components
- Report incidents
- Customise the look of your status page
- Markdown support for incident messages
- A powerful JSON API
- Metrics
- Multi-lingual
- Subscriber notifications via email
- Two factor authentication

## Known issues
- Must necessarily be installed on domain root (see upstream issue [here](https://github.com/CachetHQ/Cachet/issues/1696))
- Can't integrate with YunoHost SSO as LDAP support is not implemented yet (see upstream issue [here](https://github.com/CachetHQ/Cachet/issues/2108))

#### Supported architectures

* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/cachet%20%28Community%29.svg)](https://ci-apps.yunohost.org/ci/apps/cachet/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/cachet%20%28Community%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/cachet/)
* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/cachet%20%28Community%29.svg)](https://ci-stretch.nohost.me/ci/apps/cachet/)

## Links

* Report a bug: https://github.com/YunoHost-Apps/cachet_ynh/issues
* Cachet website: https://cachethq.io/
* Cachet documentation: https://docs.cachethq.io/reference
* YunoHost website: https://yunohost.org/
# Cachet for YunoHost

[![Integration level](https://dash.yunohost.org/integration/cachet.svg)](https://dash.yunohost.org/appci/app/cachet)
[![Install cachet with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=cachet)

> *This package allows you to install cachet quickly and simply on a YunoHost server.
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*

## Overview
[Cachet](https://cachethq.io/) is a free, open source status page for your API, service or company. Built with all of the features that you'd expect from a status page, Cachet comes with a powerful API, a metric system, multiple user support, two factor authentication for added security and is easy to get setup. A powerful, self-hosted alternative to StatusPage.io and Status.io.

![](https://github.com/CachetHQ/Assets/raw/master/images/logo/Cachet.png)

**Shipped version:** 2.3.18

## Screenshots

![](https://github.com/CachetHQ/Assets/raw/master/screenshots/main-interface.png)

## Demo

* [Official demo](https://demo.cachethq.io/)

## Configuration

Totally configurable through the Cachet application dashboard.

## Documentation

* Official documentation: https://docs.cachethq.io/
* YunoHost documentation: If specific documentation is needed, feel free to contribute.

## YunoHost specific features

#### Multi-user support

LDAP or HTTP authentication aren't supported (see limitations below).
This package supports multiple instances installation.

#### Supported architectures

* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/cachet%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/cachet/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/cachet%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/cachet/)

## Limitations

- Must necessarily be installed on domain root (see upstream issue [here](https://github.com/CachetHQ/Cachet/issues/1696))
- Can't integrate with YunoHost SSO as LDAP support is not implemented yet (see upstream issue [here](https://github.com/CachetHQ/Cachet/issues/2108))


## Additional information

None.

**More information on the documentation page:**
https://yunohost.org/packaging_apps

## Links

* Report a bug: https://github.com/YunoHost-Apps/cachet_ynh/issues
* App website: https://cachethq.io/
* Upstream app repository: https://github.com/CachetHQ/Cachet
* YunoHost website: https://yunohost.org/

---

Developers info
----------------

**Only if you want to use a testing branch for coding, instead of merging directly into master.**
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/cachet_ynh/tree/testing).

To try the testing branch, please proceed like that.
```
sudo yunohost app install https://github.com/YunoHost-Apps/cachet_ynh/tree/testing --debug
or
sudo yunohost app upgrade cachet -u https://github.com/YunoHost-Apps/cachet_ynh/tree/testing --debug
```
21 changes: 5 additions & 16 deletions check_process
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,18 @@
setup_private=1
setup_public=1
upgrade=1
upgrade=1 from_commit=9a06e3b29bad16c2f360fa0431e2d6f950ea8964
upgrade=1 from_commit=7497ea8b6915b725358db0d4a1210f999961cfee
backup_restore=1
multi_instance=1
incorrect_path=0
port_already_use=0
change_url=0
change_url=1
;;; Levels
Level 1=auto
Level 2=auto
Level 3=auto
# https://github.com/YunoHost-Apps/cachet_ynh/issues/1
Level 4=na
# https://github.com/YunoHost-Apps/cachet_ynh/issues/2
Level 5=1
Level 6=auto
Level 7=auto
Level 8=0
Level 9=0
Level 10=0
Level 5=auto
;;; Options
Email=
Notification=none
;;; Upgrade options
; commit=9a06e3b29bad16c2f360fa0431e2d6f950ea8964
name=Fix dependencies, add change_url script, minor changes
; commit=7497ea8b6915b725358db0d4a1210f999961cfee
name=Update dependencies for buster
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&admin_password=secret&language=en&is_public=1&
4 changes: 2 additions & 2 deletions conf/app.src
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/CachetHQ/Cachet/archive/v2.3.18.tar.gz
SOURCE_SUM=ba74a1f83a0d4f800d02584de285bfabe28b4c5e2408b23af30a2dee9d65174d
SOURCE_URL=https://github.com/CachetHQ/Cachet/archive/c7ad51e87645e5a717fb817616424276a8e5345b.tar.gz
SOURCE_SUM=7897744356bf81a2bcbc734f132eb5daafa889611c9c72fb2501afb3e9007cac
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true
Expand Down
14 changes: 0 additions & 14 deletions conf/init-mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,3 @@ INSERT INTO `settings` (`id`, `name`, `value`) VALUES

INSERT INTO `users` (`id`, `username`, `password`, `email`, `api_key`, `active`, `level`) VALUES
(1, '__USER__', '__PASSWORD_HASH__', '__EMAIL__', '', 1, 1);

-- API key : 3INrrFW4zwdpDJbqxT0O


-- INSERT INTO `settings` (`id`, `name`, `value`, `created_at`, `updated_at`) VALUES
-- (1, 'app_name', 'yolo', '2017-09-02 20:22:38', '2017-09-02 20:22:38'),
-- (2, 'app_domain', 'https://ortest.local', '2017-09-02 20:22:38', '2017-09-02 20:22:38'),
-- (3, 'app_timezone', 'Africa/Cairo', '2017-09-02 20:22:38', '2017-09-02 20:22:38'),
-- (4, 'app_locale', 'en', '2017-09-02 20:22:38', '2017-09-02 20:22:38'),
-- (5, 'app_incident_days', '7', '2017-09-02 20:22:38', '2017-09-02 20:22:38');


-- INSERT INTO `users` (`id`, `username`, `password`, `remember_token`, `google_2fa_secret`, `email`, `api_key`, `active`, `level`, `created_at`, `updated_at`) VALUES
-- (1, 'jimmy', '$2y$10$49h3sucbCUhvDsCCtlQlAOB2z5R9mdyw0sSYCDA0rFe0kndxl3w.W', NULL, NULL, 'jimmy@ortest.local', '3INrrFW4zwdpDJbqxT0O', 1, 1, '2017-09-02 20:22:38', '2017-09-02 20:22:38');
47 changes: 15 additions & 32 deletions conf/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,47 +1,30 @@
location ^~ __PATH__ {
alias __FINALPATH__/public/;
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {

# Path to source
alias __FINALPATH__/public/ ;

# Force usage of https
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
add_header Strict-Transport-Security max-age=15768000;

more_set_headers "Strict-Transport-Security: max-age=15768000";

index index.php;
location __PATH__ {
rewrite ^ __PATH__index.php$request_uri;
try_files $uri __PATH__/index.php;
}

location ~ [^/]\.php {
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm-__NAME__.sock;
fastcgi_pass unix:/var/run/php/php__YNH_PHP_VERSION__-fpm-__NAME__.sock;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_index index.php;
fastcgi_keep_conn on;
add_header Strict-Transport-Security max-age=15768000;
}

# Adding the cache control header for js and css files
location ~* \.(?:css|js)$ {
add_header Cache-Control "public, max-age=7200";
# Add headers to serve security related headers
add_header Strict-Transport-Security "max-age=15768000;";
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
# Optional: Don't log access to assets
access_log off;
more_set_headers "Strict-Transport-Security: max-age=15768000";
}

location ~* \.(?:svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$ {
# Optional: Don't log access to other assets
access_log off;
}

# show YunoHost panel access
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}


}

0 comments on commit 6fd9423

Please sign in to comment.