mirror of
https://git.cloudron.io/cloudron/freshrss-app
synced 2025-09-16 10:19:15 +00:00
Compare commits
17 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a969ec1719 | ||
|
19450e9212 | ||
|
ddb0abe0fe | ||
|
6baf0d59f9 | ||
|
1d57f0f321 | ||
|
f7db98f93d | ||
|
a8dc7cb6bf | ||
|
83ee152f4f | ||
|
9ebdd87f37 | ||
|
4b4560e178 | ||
|
45f13f695f | ||
|
7691695423 | ||
|
083b4fd832 | ||
|
fe944c9238 | ||
|
e26b11a102 | ||
|
91367404fe | ||
|
497199febd |
20
CHANGELOG
20
CHANGELOG
@@ -10,3 +10,23 @@
|
||||
* Using cli scripts
|
||||
* Using scheduler for periodic task
|
||||
* Removed update menu item
|
||||
|
||||
[0.4.0]
|
||||
* Updated to FreshRSS 1.6.3
|
||||
* Removed most custom patches (FreshRSS includes those now)
|
||||
|
||||
[0.4.1]
|
||||
* Add parameter to allow for encoded slashes (thanks @Richard)
|
||||
* Updated description (thanks @Girish)
|
||||
|
||||
[0.5.0]
|
||||
* Not using mysql port as this causes an error
|
||||
* Storing sessions in /run
|
||||
* Storing api logs in /tmp
|
||||
* Set some php options
|
||||
|
||||
[0.6.0]
|
||||
* Updated to FreshRSS 1.7.0
|
||||
|
||||
[0.7.0]
|
||||
* Updated to FreshRSS 1.8.0
|
||||
|
@@ -5,7 +5,7 @@
|
||||
"description": "file://DESCRIPTION.md",
|
||||
"changelog": "file://CHANGELOG",
|
||||
"tagline": "RSS feed reader",
|
||||
"version": "0.3.0",
|
||||
"version": "0.7.0",
|
||||
"healthCheckPath": "/",
|
||||
"httpPort": 8000,
|
||||
"addons": {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
This app packages FreshRSS 1.6.2.
|
||||
This app packages FreshRSS <upstream>1.8.0</upstream>.
|
||||
|
||||
FreshRSS is a self-hosted RSS feed aggregator such as Leed or Kriss Feed.
|
||||
|
||||
|
16
Dockerfile
16
Dockerfile
@@ -7,8 +7,8 @@ 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
|
||||
ENV EXTENSIONS_VERSION eac4b749775c3e1b584c1a6b4a4487e4a4b8b159
|
||||
ENV VERSION 1.8.0
|
||||
ENV EXTENSIONS_VERSION a60a0ce5d0d864b5654a4d2609167d03c2299500
|
||||
|
||||
RUN mkdir -p /app/code
|
||||
WORKDIR /app/code
|
||||
@@ -40,12 +40,16 @@ RUN rm /etc/apache2/sites-enabled/* \
|
||||
&& a2ensite freshrss
|
||||
|
||||
RUN rm -rf /var/lib/php \
|
||||
&& ln -s /run/php /var/lib/php
|
||||
&& ln -s /run/php /var/lib/php \
|
||||
&& mkdir -p /run/php/session
|
||||
|
||||
ADD remove-update-menu.patch /app/code/remove-update-menu.patch
|
||||
RUN patch -p0 -d /app/code < /app/code/remove-update-menu.patch
|
||||
RUN crudini --set /etc/php/7.0/apache2/php.ini PHP upload_max_filesize 64M && \
|
||||
crudini --set /etc/php/7.0/apache2/php.ini PHP post_max_size 64M && \
|
||||
crudini --set /etc/php/7.0/apache2/php.ini PHP memory_limit 64M && \
|
||||
crudini --set /etc/php/7.0/apache2/php.ini Session session.save_path /run/php/session && \
|
||||
crudini --set /etc/php/7.0/apache2/php.ini Session session.gc_probability 1 && \
|
||||
crudini --set /etc/php/7.0/apache2/php.ini Session session.gc_divisor 100
|
||||
|
||||
ADD start.sh /app/code/start.sh
|
||||
ADD set_config.php /app/code/set_config.php
|
||||
|
||||
CMD [ "/app/code/start.sh" ]
|
||||
|
@@ -31,7 +31,6 @@ The e2e tests are located in the `test/` folder and require [nodejs](http://node
|
||||
cd freshrss-app/test
|
||||
|
||||
npm install
|
||||
export PATH=$PATH:node_modules/.bin
|
||||
mocha --bail test.js
|
||||
PATH=$PATH:node_modules/.bin mocha --bail test.js
|
||||
```
|
||||
|
||||
|
@@ -1,5 +1,6 @@
|
||||
<VirtualHost *:8000>
|
||||
DocumentRoot /app/code
|
||||
AllowEncodedSlashes On
|
||||
|
||||
ErrorLog /dev/stderr
|
||||
CustomLog /dev/stdout combined
|
||||
|
@@ -1,24 +0,0 @@
|
||||
diff -Naru app-orig/layout/aside_configure.phtml app/layout/aside_configure.phtml
|
||||
--- app-orig/layout/aside_configure.phtml 2016-12-26 15:33:47.000000000 +0000
|
||||
+++ app/layout/aside_configure.phtml 2017-02-23 14:48:10.214072522 +0000
|
||||
@@ -41,9 +41,5 @@
|
||||
Minz_Request::actionName() === 'checkInstall' ? ' active' : ''; ?>">
|
||||
<a href="<?php echo _url('update', 'checkInstall'); ?>"><?php echo _t('gen.menu.check_install'); ?></a>
|
||||
</li>
|
||||
- <li class="item<?php echo Minz_Request::controllerName() === 'update' &&
|
||||
- Minz_Request::actionName() === 'index' ? ' active' : ''; ?>">
|
||||
- <a href="<?php echo _url('update', 'index'); ?>"><?php echo _t('gen.menu.update'); ?></a>
|
||||
- </li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
diff -Naru app-orig/layout/header.phtml app/layout/header.phtml
|
||||
--- app-orig/layout/header.phtml 2016-12-26 15:33:47.000000000 +0000
|
||||
+++ app/layout/header.phtml 2017-02-23 14:48:31.430114487 +0000
|
||||
@@ -71,7 +71,6 @@
|
||||
<li class="item"><a href="<?php echo _url('user', 'manage'); ?>"><?php echo _t('gen.menu.user_management'); ?></a></li>
|
||||
<li class="item"><a href="<?php echo _url('auth', 'index'); ?>"><?php echo _t('gen.menu.authentication'); ?></a></li>
|
||||
<li class="item"><a href="<?php echo _url('update', 'checkInstall'); ?>"><?php echo _t('gen.menu.check_install'); ?></a></li>
|
||||
- <li class="item"><a href="<?php echo _url('update', 'index'); ?>"><?php echo _t('gen.menu.update'); ?></a></li>
|
||||
<?php } ?>
|
||||
<li class="separator"></li>
|
||||
<li class="item"><a href="<?php echo _url('stats', 'index'); ?>"><?php echo _t('gen.menu.stats'); ?></a></li>
|
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
$config = include("/app/data/config.php");
|
||||
|
||||
$config["default_user"] = "admin";
|
||||
$config["base_url"] = "https://".getenv('APP_DOMAIN')."/p";
|
||||
$config["db"] = array (
|
||||
"type" => "mysql",
|
||||
"host" => getenv('MYSQL_HOST'),
|
||||
"user" => getenv('MYSQL_USERNAME'),
|
||||
"password" => getenv('MYSQL_PASSWORD'),
|
||||
"base" => getenv('MYSQL_DATABASE'),
|
||||
"prefix" => "",
|
||||
"pdo_options" =>
|
||||
array (
|
||||
)
|
||||
);
|
||||
|
||||
$config_str = var_export($config, TRUE);
|
||||
file_put_contents("/app/data/config.php", "<?php return $config_str;");
|
||||
|
||||
?>
|
24
start.sh
24
start.sh
@@ -9,16 +9,24 @@ if ! [ -f /app/data/.installed ]; then
|
||||
rsync -a /app/code/data-orig/ /app/data/
|
||||
php cli/do-install.php \
|
||||
--environment production --default_user admin \
|
||||
--db-type mysql --db-host "${MYSQL_HOST}:${MYSQL_PORT}" \
|
||||
--db-type mysql --db-host "${MYSQL_HOST}" \
|
||||
--db-user "${MYSQL_USERNAME}" --db-password "${MYSQL_PASSWORD}" \
|
||||
--db-base "${MYSQL_DATABASE}" --db-prefix ""
|
||||
php set_config.php # --db-prefix "" seems to be ignored
|
||||
--db-base "${MYSQL_DATABASE}" --db-prefix "" \
|
||||
--disable_update
|
||||
php cli/create-user.php --user admin --password password --language en
|
||||
php cli/actualize-user.php --user admin
|
||||
touch /app/data/.installed
|
||||
echo "Done."
|
||||
fi
|
||||
|
||||
|
||||
echo "Symlinking log file"
|
||||
rm -f /app/data/users/_/log_api.txt
|
||||
touch /tmp/log_api.txt
|
||||
ln -s /tmp/log_api.txt /app/data/users/_/log_api.txt
|
||||
|
||||
|
||||
echo "Symlinking packaged extensions"
|
||||
mkdir -p /app/data/extensions
|
||||
for f in $(ls /app/code/extensions-orig); do
|
||||
if ! [ -e "/app/data/extensions/$f" ]; then
|
||||
@@ -27,12 +35,16 @@ for f in $(ls /app/code/extensions-orig); do
|
||||
done
|
||||
|
||||
|
||||
echo "Creating config file"
|
||||
php set_config.php
|
||||
echo "Updating config file"
|
||||
php cli/reconfigure.php --default_user admin --base_url "https://${APP_DOMAIN}/p" \
|
||||
--db-type mysql --db-host "${MYSQL_HOST}" \
|
||||
--db-user "${MYSQL_USERNAME}" --db-password "${MYSQL_PASSWORD}" \
|
||||
--db-base "${MYSQL_DATABASE}" --db-prefix "" \
|
||||
--disable_update
|
||||
|
||||
|
||||
echo "Setting permissions"
|
||||
chown -R www-data.www-data /run/php /app/data
|
||||
chown -R www-data.www-data /run/php /app/data /tmp/log_api.txt
|
||||
|
||||
|
||||
echo "Starting apache"
|
||||
|
21
test/test.js
21
test/test.js
@@ -38,7 +38,7 @@ describe('Application life cycle test', function () {
|
||||
done();
|
||||
});
|
||||
|
||||
var LOCATION = 'freshrss-test';
|
||||
var LOCATION = 'test';
|
||||
var TEST_TIMEOUT = 10000;
|
||||
var app;
|
||||
|
||||
@@ -118,6 +118,19 @@ describe('Application life cycle test', function () {
|
||||
});
|
||||
}
|
||||
|
||||
function enableApi(callback) {
|
||||
browser.get('https://' + app.fqdn + '/p/i/?c=auth').then(function () {
|
||||
return browser.findElement(by.id('api_enabled')).click();
|
||||
}).then(function () {
|
||||
return browser.findElement(by.xpath('//form[@action=".?c=auth"]')).submit();
|
||||
}).then(callback);
|
||||
}
|
||||
|
||||
function checkApiConfiguration(callback) {
|
||||
browser.get('https://' + app.fqdn + '/p/api/greader.php/check%2Fcompatibility').then(function () {
|
||||
exists(by.xpath('//pre[text()="PASS"]'), callback);
|
||||
});
|
||||
}
|
||||
|
||||
xit('build app', function () {
|
||||
execSync('cloudron build', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||
@@ -138,6 +151,8 @@ describe('Application life cycle test', function () {
|
||||
it('can login', login);
|
||||
it('can subscribe', addSubscription);
|
||||
it('can add users', addUser);
|
||||
it('can enable API', enableApi);
|
||||
it('can check configuration', checkApiConfiguration);
|
||||
it('can logout', logout);
|
||||
|
||||
it('backup app', function () {
|
||||
@@ -149,17 +164,19 @@ describe('Application life cycle test', function () {
|
||||
});
|
||||
|
||||
it('can login', login);
|
||||
it('can check configuration', checkApiConfiguration);
|
||||
it('can logout', logout);
|
||||
|
||||
it('move to different location', function () {
|
||||
browser.manage().deleteAllCookies();
|
||||
execSync('cloudron configure --location ' + LOCATION + '2', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||
execSync('cloudron configure --wait --location ' + LOCATION + '2', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||
var inspect = JSON.parse(execSync('cloudron inspect'));
|
||||
app = inspect.apps.filter(function (a) { return a.location === LOCATION + '2'; })[0];
|
||||
expect(app).to.be.an('object');
|
||||
});
|
||||
|
||||
it('can login', login);
|
||||
it('can check configuration', checkApiConfiguration);
|
||||
it('can logout', logout);
|
||||
|
||||
it('uninstall app', function () {
|
||||
|
Reference in New Issue
Block a user