mirror of
https://git.cloudron.io/cloudron/freshrss-app
synced 2025-09-16 10:19:15 +00:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
e21660b91e | ||
|
5e479d4936 | ||
|
9aa88ae21a | ||
|
62182d519b | ||
|
cbc8866253 | ||
|
753a9fb251 | ||
|
28ae86b5f8 |
@@ -41,3 +41,5 @@
|
||||
* Better apache configs
|
||||
* Update extensions
|
||||
|
||||
[1.0.0]
|
||||
* Fix issue where static extension assets were not served
|
||||
|
@@ -5,7 +5,7 @@
|
||||
"description": "file://DESCRIPTION.md",
|
||||
"changelog": "file://CHANGELOG",
|
||||
"tagline": "RSS feed reader",
|
||||
"version": "0.10.0",
|
||||
"version": "1.0.0",
|
||||
"healthCheckPath": "/",
|
||||
"httpPort": 8000,
|
||||
"addons": {
|
||||
@@ -33,5 +33,7 @@
|
||||
"mediaLinks": [
|
||||
"https://s3.amazonaws.com/cloudron-app-screenshots/org.freshrss.cloudronapp/7d731e71a6faa3791e19b7d7daf468a9486349cc/1.png"
|
||||
],
|
||||
"postInstallMessage": "file://POSTINSTALL.md"
|
||||
"postInstallMessage": "file://POSTINSTALL.md",
|
||||
"minBoxVersion": "2.0.0",
|
||||
"documentationUrl": "https://cloudron.io/documentation/apps/freshrss/"
|
||||
}
|
||||
|
15
Dockerfile
15
Dockerfile
@@ -4,25 +4,20 @@ 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.10.2
|
||||
ENV EXTENSIONS_VERSION b63f55d6fdd8e93da846bb741c3fed12d50909be
|
||||
|
||||
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
|
||||
# contains fix for extensions_path (see #2)
|
||||
RUN curl -L https://github.com/cloudron-io/FreshRSS/archive/d56d8f31bd0e1f73e91ab9130a25fa0121cfd086.tar.gz | tar -zxvf - --strip-components=1
|
||||
|
||||
RUN mv data data-orig && ln -s /app/data data
|
||||
|
||||
# official extensions
|
||||
ADD change-ttrss-file-path.patch /app/code/change-ttrss-file-path.patch
|
||||
RUN wget https://github.com/FreshRSS/Extensions/archive/${EXTENSIONS_VERSION}.tar.gz -O - \
|
||||
| tar -xz --strip-components=1 -C /app/code/extensions \
|
||||
&& patch -p0 -d /app/code < /app/code/change-ttrss-file-path.patch \
|
||||
&& mv /app/code/extensions /app/code/extensions-orig \
|
||||
&& ln -s /app/data/extensions /app/code/extensions \
|
||||
&& ln -s /app/data/extensions/ttrss.php /app/code/p/api/ttrss.php
|
||||
RUN wget https://github.com/FreshRSS/Extensions/archive/${EXTENSIONS_VERSION}.tar.gz -O - | tar -xz --strip-components=1 -C /app/code/extensions && \
|
||||
mv /app/code/extensions /app/code/extensions-orig && \
|
||||
ln -s /app/data/extensions /app/code/extensions
|
||||
|
||||
# configure apache
|
||||
RUN rm /etc/apache2/sites-enabled/*
|
||||
|
@@ -1,21 +0,0 @@
|
||||
diff -ru extensions-orig/xExtension-TTRSS_API/extension.php extensions/xExtension-TTRSS_API/extension.php
|
||||
--- extensions-orig/xExtension-TTRSS_API/extension.php 2016-12-15 10:24:17.000000000 +0000
|
||||
+++ extensions/xExtension-TTRSS_API/extension.php 2017-02-18 13:06:59.640761922 +0000
|
||||
@@ -9,7 +9,7 @@
|
||||
public function install() {
|
||||
$filename = 'ttrss.php';
|
||||
$file_source = join_path($this->getPath(), $filename);
|
||||
- $path_destination = join_path(PUBLIC_PATH, 'api');
|
||||
+ $path_destination = '/app/data/extensions';
|
||||
$file_destination = join_path($path_destination, $filename);
|
||||
|
||||
if (!is_writable($path_destination)) {
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
public function uninstall() {
|
||||
$filename = 'ttrss.php';
|
||||
- $file_destination = join_path(PUBLIC_PATH, 'api', $filename);
|
||||
+ $file_destination = join_path('/app/data/extensions', $filename);
|
||||
|
||||
if (file_exists($file_destination) && !unlink($file_destination)) {
|
||||
return 'API file cannot be removed';
|
9
start.sh
9
start.sh
@@ -25,13 +25,12 @@ 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"
|
||||
# We have to copy instead of symlinking extensions (see #2)
|
||||
echo "Copying packaged extensions"
|
||||
mkdir -p /app/data/extensions
|
||||
for f in $(ls /app/code/extensions-orig); do
|
||||
if ! [ -e "/app/data/extensions/$f" ]; then
|
||||
ln -s "/app/code/extensions-orig/$f" "/app/data/extensions/$f"
|
||||
fi
|
||||
rm -rf "/app/data/extensions/$f"
|
||||
cp -r "/app/code/extensions-orig/$f" "/app/data/extensions"
|
||||
done
|
||||
|
||||
|
||||
|
@@ -17,6 +17,6 @@
|
||||
"rimraf": "^2.5.3",
|
||||
"selenium-server-standalone-jar": "^2.53.1",
|
||||
"selenium-webdriver": "^2.53.3",
|
||||
"superagent": "^1.4.0"
|
||||
"superagent": "^1.8.5"
|
||||
}
|
||||
}
|
||||
|
16
test/test.js
16
test/test.js
@@ -7,6 +7,7 @@ require('chromedriver');
|
||||
var execSync = require('child_process').execSync,
|
||||
expect = require('expect.js'),
|
||||
path = require('path'),
|
||||
superagent = require('superagent'),
|
||||
webdriver = require('selenium-webdriver');
|
||||
|
||||
var by = webdriver.By,
|
||||
@@ -146,6 +147,17 @@ describe('Application life cycle test', function () {
|
||||
visible(by.xpath('//a[text()="Cloudron.io"]'), callback);
|
||||
}
|
||||
|
||||
function getStaticExtensionFile(callback) {
|
||||
superagent.get(`https://${app.fqdn}/p/ext.php?f=xExtension-StickyFeeds/static/script.js&t=js`)
|
||||
.buffer(true)
|
||||
.end(function (err, res) {
|
||||
expect(err).to.be(null);
|
||||
expect(res.status).to.be(200);
|
||||
expect(res.text).to.contain('sticky_feeds'); // relies on the buffer flag above
|
||||
callback();
|
||||
});
|
||||
}
|
||||
|
||||
xit('build app', function () {
|
||||
execSync('cloudron build', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||
});
|
||||
@@ -162,6 +174,7 @@ describe('Application life cycle test', function () {
|
||||
it('can enable API', enableApi);
|
||||
it('can check configuration', checkApiConfiguration);
|
||||
it('subscription exists', subscriptionExists);
|
||||
it('can get static extension file', getStaticExtensionFile);
|
||||
it('can logout', logout);
|
||||
|
||||
it('backup app', function () {
|
||||
@@ -175,6 +188,7 @@ describe('Application life cycle test', function () {
|
||||
it('can login', login);
|
||||
it('can check configuration', checkApiConfiguration);
|
||||
it('subscription exists', subscriptionExists);
|
||||
it('can get static extension file', getStaticExtensionFile);
|
||||
it('can logout', logout);
|
||||
|
||||
it('move to different location', function () {
|
||||
@@ -188,6 +202,7 @@ describe('Application life cycle test', function () {
|
||||
it('can login', login);
|
||||
it('can check configuration', checkApiConfiguration);
|
||||
it('subscription exists', subscriptionExists);
|
||||
it('can get static extension file', getStaticExtensionFile);
|
||||
it('can logout', logout);
|
||||
|
||||
it('uninstall app', function () {
|
||||
@@ -213,6 +228,7 @@ describe('Application life cycle test', function () {
|
||||
|
||||
it('can login', login);
|
||||
it('subscription exists', subscriptionExists);
|
||||
it('can get static extension file', getStaticExtensionFile);
|
||||
|
||||
it('uninstall app', function () {
|
||||
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||
|
Reference in New Issue
Block a user