1
0
mirror of https://git.cloudron.io/cloudron/freshrss-app synced 2026-04-30 14:41:01 +00:00

Initial commit

This commit is contained in:
Dennis Schwerdel
2017-02-17 09:45:48 +01:00
commit 0b95d20d1e
14 changed files with 240 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
.git
.gitignore
.dockerignore
node_modules
screenshots
test
+1
View File
@@ -0,0 +1 @@
test/node_modules/
+2
View File
@@ -0,0 +1,2 @@
[0.1.0]
* Initial version
+25
View File
@@ -0,0 +1,25 @@
{
"id": "org.freshrss.cloudronapp",
"title": "FreshRSS",
"author": "FreshRSS Developers",
"description": "file://DESCRIPTION.md",
"changelog": "file://CHANGELOG",
"tagline": "RSS reader",
"version": "0.1.0",
"healthCheckPath": "/",
"httpPort": 8000,
"addons": {
"localstorage": {},
"mysql": {}
},
"manifestVersion": 1,
"website": "http://www.freshrss.org",
"contactEmail": "support@cloudron.io",
"icon": "logo.png",
"tags": [
"rss"
],
"mediaLinks": [
],
"postInstallMessage": "file://POSTINSTALL.md"
}
+21
View File
@@ -0,0 +1,21 @@
This app packages FreshRSS 1.6.2.
FreshRSS is a self-hosted RSS feed aggregator such as Leed or Kriss Feed.
It is at the same time lightweight, easy to work with, powerful and customizable.
It is a multi-user application with an anonymous reading mode. It supports PubSubHubbub for instant notifications from compatible Web sites. There is an API for (mobile) clients, and a Command-Line Interface. Finally, it supports extensions for further tuning.
### Extensions
FreshRSS supports further customizations by adding extensions on top of its core functionality.
See the [repository dedicated to those extensions](https://github.com/FreshRSS/Extensions).
### Compatible clients
Any client supporting a Google Reader-like API. Selection:
* Android
* [News+](https://play.google.com/store/apps/details?id=com.noinnion.android.newsplus) with [News+ Google Reader extension](https://play.google.com/store/apps/details?id=com.noinnion.android.newsplus.extension.google_reader) (Closed source)
* [EasyRSS](https://github.com/Alkarex/EasyRSS) (Open source, F-Droid)
* Linux
* [FeedReader 2.0+](https://jangernert.github.io/FeedReader/) (Open source)
+35
View File
@@ -0,0 +1,35 @@
FROM cloudron/base:0.9.0
MAINTAINER Rainloop Developers <support@cloudron.io>
EXPOSE 8000
RUN apt-get update \
&& apt-get -y install php php-curl php-gmp php-intl php-mbstring php-xml php-zip \
libapache2-mod-php mysql-client php-mysql
ENV VERSION 1.6.2
RUN mkdir -p /app/code
WORKDIR /app/code
RUN wget "https://github.com/FreshRSS/FreshRSS/archive/${VERSION}.tar.gz" -O - \
| tar -xz --strip-components=1
RUN mkdir -p /app/data \
&& mv data data-orig \
&& ln -s /app/data data
ADD apache2.conf /etc/apache2/sites-available/freshrss.conf
RUN rm /etc/apache2/sites-enabled/* \
&& sed -e 's,^ErrorLog.*,ErrorLog "/dev/stderr",' -i /etc/apache2/apache2.conf \
&& sed -e "s,MaxSpareServers[^:].*,MaxSpareServers 5," -i /etc/apache2/mods-available/mpm_prefork.conf \
&& a2disconf other-vhosts-access-log \
&& echo "Listen 8000" > /etc/apache2/ports.conf \
&& a2enmod headers expires \
&& a2ensite freshrss
ADD start.sh /app/code/start.sh
ADD setup_db.php /app/code/setup_db.php
CMD [ "/app/code/start.sh" ]
+9
View File
@@ -0,0 +1,9 @@
MIT License (MIT)
Copyright (c) 2016 Cloudron UG
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+10
View File
@@ -0,0 +1,10 @@
This application does not integrate with Cloudron authentication.
There is a preconfigured administrator account with the following credentials:
* Username: `admin`
* Password: `password`
(Please change that password on first login)
You can create more accounts withing the app when logged in as administrator.
+36
View File
@@ -0,0 +1,36 @@
# FreshRSS Cloudron App
This repository contains the Cloudron app package source for [FreshRSS](http://www.freshrss.org/).
## Installation
[![Install](https://cloudron.io/img/button.svg)](https://cloudron.io/button.html?app=org.freshrss.cloudronapp)
or using the [Cloudron command line tooling](https://cloudron.io/references/cli.html)
```
cloudron install --appstore-id org.freshrss.cloudronapp
```
## Building
The app package can be built using the [Cloudron command line tooling](https://cloudron.io/references/cli.html).
```
cd freshrss-app
cloudron build
cloudron install
```
## Testing
The e2e tests are located in the `test/` folder and require [nodejs](http://nodejs.org/). They are creating a fresh build, install the app on your Cloudron, perform tests, backup, restore and test if the repos are still ok. The tests expect port 29418 to be available.
```
cd freshrss-app/test
npm install
USERNAME=<cloudron username> PASSWORD=<cloudron password> mocha --bail test.js
```
+17
View File
@@ -0,0 +1,17 @@
<VirtualHost *:8000>
DocumentRoot /app/code
ErrorLog /dev/stderr
CustomLog /dev/stdout combined
<Directory /app/code/>
Options +FollowSymLinks
AllowOverride All
Require all granted
<IfModule mod_php7.c>
php_value memory_limit 64m
</IfModule>
</Directory>
</VirtualHost>
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

+14
View File
@@ -0,0 +1,14 @@
<?PHP
include_once('/app/code/app/SQL/install.sql.mysql.php');
$c = new PDO("mysql:dbname=".getenv('MYSQL_DATABASE').";host=".getenv('MYSQL_HOST').";port=".getenv('MYSQL_PORT'), getenv('MYSQL_USERNAME'), getenv('MYSQL_PASSWORD'));
$sql = sprintf(SQL_CREATE_TABLES, 'admin_', 'Uncategorized');
$stm = $c->prepare($sql);
$stm->execute();
$sql = sprintf(SQL_INSERT_FEEDS, 'admin_');
$stm = $c->prepare($sql);
$stm->execute();
Executable
+63
View File
@@ -0,0 +1,63 @@
#!/bin/bash
set -eu
if ! [ -f /app/data/.installed ]; then
echo "Fresh installation, setting up..."
rsync -a /app/code/data-orig/ /app/data/
dd if=/dev/urandom bs=1 count=1024 2>/dev/null | sha1sum | awk '{ print $1 }' > /app/data/.salt
mkdir -p /app/data/users/admin
cat > /app/data/users/admin/config.php <<EOF
<?php
return array (
'language' => 'en',
'passwordHash' => '\$2a\$09\$lO5xTAsfRCG1rSssJgHtTeiweXj2VwGN/JfuexIMpsQWzKoFVoklm',
'apiPasswordHash' => '',
);
?>
EOF
touch /app/data/users/admin/log.txt
rm /app/data/do-install.txt
php /app/code/setup_db.php
touch /app/data/.installed
echo "Done."
fi
echo "Creating config file"
SALT=$(cat /app/data/.salt)
cat > /app/data/config.php <<EOF
<?php
return array (
'salt' => '${SALT}',
'base_url' => 'https://${APP_DOMAIN}/p',
'title' => 'FreshRSS',
'default_user' => 'admin',
'auth_type' => 'form',
'db' =>
array (
'type' => 'mysql',
'host' => '${MYSQL_HOST}',
'user' => '${MYSQL_USERNAME}',
'password' => '${MYSQL_PASSWORD}',
'base' => '${MYSQL_DATABASE}',
'prefix' => '',
'pdo_options' =>
array (
),
),
'pubsubhubbub_enabled' => true,
);
EOF
chown -R www-data.www-data /app/data
echo "Trying to update feeds every 60 secs"
while true; do
sleep 60
curl 'http://localhost:8000/p/i/?c=feed&a=actualize' >/dev/stdout 2>/dev/stderr
done &
echo "Starting apache"
APACHE_CONFDIR="" source /etc/apache2/envvars
rm -f "${APACHE_PID_FILE}"
exec /usr/sbin/apache2 -DFOREGROUND