mirror of
https://git.cloudron.io/cloudron/syncthing-app
synced 2025-09-21 12:27:35 +00:00
Compare commits
23 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
692c124a61 | ||
|
70c159edbc | ||
|
d7a7febb91 | ||
|
9fff5574cb | ||
|
cfc7133606 | ||
|
ef92705074 | ||
|
baf46b3f52 | ||
|
3d8ea24781 | ||
|
37558f3b10 | ||
|
0e8b61d7d4 | ||
|
e628a70b60 | ||
|
02e9dbdedc | ||
|
3e83a29587 | ||
|
bbe4721c76 | ||
|
37b6969e24 | ||
|
92ae28d0da | ||
|
5e085fc42a | ||
|
d1c449aef8 | ||
|
831efb6f8c | ||
|
012db8bad1 | ||
|
4e805ba62f | ||
|
13de61d86e | ||
|
b5aadcde74 |
32
CHANGELOG
32
CHANGELOG
@@ -2,26 +2,16 @@
|
|||||||
* Initial version
|
* Initial version
|
||||||
|
|
||||||
[0.1.1]
|
[0.1.1]
|
||||||
* Added screenshots
|
* Huge speedup by caching ldap
|
||||||
|
|
||||||
|
[0.1.2]
|
||||||
|
* Fixed wrong URL
|
||||||
|
|
||||||
|
[0.1.3]
|
||||||
|
* Updated postinstall message
|
||||||
|
|
||||||
[0.2.0]
|
[0.2.0]
|
||||||
* Updated to 2017-01-25T03-14-52Z
|
* Upstream version 0.14.29
|
||||||
|
* Uses syncthing generated config (thanks to @rymnel)
|
||||||
[0.2.1]
|
* Fixed typo in manifest (thanks to @rymnel)
|
||||||
* Updated to 2017-02-16T01-47-30Z
|
* Running under user cloudron
|
||||||
* This version fixes the settings bug
|
|
||||||
|
|
||||||
[0.2.2]
|
|
||||||
* New base image 0.10.0
|
|
||||||
|
|
||||||
[0.2.3]
|
|
||||||
* Updated to 2017-03-16T21-50-32Z
|
|
||||||
|
|
||||||
[0.2.4]
|
|
||||||
* Updated to 2017-04-25T01-27-49Z
|
|
||||||
|
|
||||||
[0.2.5]
|
|
||||||
* Updated to 2017-04-29T00-40-27Z
|
|
||||||
|
|
||||||
[0.2.6]
|
|
||||||
* Updated to 2017-05-05T01-14-51Z
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
"description": "file://DESCRIPTION.md",
|
"description": "file://DESCRIPTION.md",
|
||||||
"changelog": "file://CHANGELOG",
|
"changelog": "file://CHANGELOG",
|
||||||
"tagline": "Decentralized file synchronization",
|
"tagline": "Decentralized file synchronization",
|
||||||
"version": "0.1.0",
|
"version": "0.2.0",
|
||||||
"healthCheckPath": "/check",
|
"healthCheckPath": "/check",
|
||||||
"httpPort": 8000,
|
"httpPort": 8000,
|
||||||
"addons": {
|
"addons": {
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"manifestVersion": 1,
|
"manifestVersion": 1,
|
||||||
"website": "http://www.synthing.net",
|
"website": "https://syncthing.net",
|
||||||
"contactEmail": "support@cloudron.io",
|
"contactEmail": "support@cloudron.io",
|
||||||
"icon": "logo.png",
|
"icon": "logo.png",
|
||||||
"tags": [
|
"tags": [
|
||||||
|
@@ -28,7 +28,7 @@ RUN ./configure \
|
|||||||
--build=cloudron-river
|
--build=cloudron-river
|
||||||
RUN make install
|
RUN make install
|
||||||
|
|
||||||
ENV VERSION 0.14.27
|
ENV VERSION 0.14.29
|
||||||
|
|
||||||
RUN mkdir -p /app/code \
|
RUN mkdir -p /app/code \
|
||||||
&& wget https://github.com/syncthing/syncthing/releases/download/v${VERSION}/syncthing-linux-amd64-v${VERSION}.tar.gz -O - \
|
&& wget https://github.com/syncthing/syncthing/releases/download/v${VERSION}/syncthing-linux-amd64-v${VERSION}.tar.gz -O - \
|
||||||
@@ -37,7 +37,6 @@ RUN mkdir -p /app/code \
|
|||||||
WORKDIR /app/code
|
WORKDIR /app/code
|
||||||
|
|
||||||
ADD nginx.conf /app/code/nginx.conf
|
ADD nginx.conf /app/code/nginx.conf
|
||||||
ADD config.xml /app/code/config.xml.default
|
|
||||||
ADD inittab /etc/inittab
|
ADD inittab /etc/inittab
|
||||||
ADD start.sh /app/code/start.sh
|
ADD start.sh /app/code/start.sh
|
||||||
|
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
This application integrates with Cloudron authentication.
|
This application integrates with Cloudron authentication.
|
||||||
However, all Cloudron users share the same Syncthing session.
|
However, all Cloudron users share the same Syncthing session.
|
||||||
|
Please note that only the username is accepted as login and not the email address.
|
||||||
|
|
||||||
Syncthing contains an internal user `admin` that is needed by Cloudron but not exposed.
|
Syncthing contains an internal user `admin` that is needed by Cloudron but not exposed.
|
||||||
Please do not change the password of that account.
|
Please do not change the password of that account.
|
||||||
|
@@ -31,7 +31,6 @@ The e2e tests are located in the `test/` folder and require [nodejs](http://node
|
|||||||
cd syncthing-app/test
|
cd syncthing-app/test
|
||||||
|
|
||||||
npm install
|
npm install
|
||||||
export PATH=$PATH:node_modules/.bin
|
PATH=$PATH:node_modules/.bin USERNAME=user PASSWORD=password mocha --bail test.js
|
||||||
USERNAME=user PASSWORD=password mocha --bail test.js
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
15
config.xml
15
config.xml
@@ -1,15 +0,0 @@
|
|||||||
<configuration version="19">
|
|
||||||
<gui enabled="true" tls="false" debugging="false">
|
|
||||||
<insecureAdminAccess>true</insecureAdminAccess>
|
|
||||||
<address>0.0.0.0:3000</address>
|
|
||||||
<theme>default</theme>
|
|
||||||
</gui>
|
|
||||||
<options>
|
|
||||||
<listenAddress>tcp://:22000</listenAddress>
|
|
||||||
<localAnnounceEnabled>false</localAnnounceEnabled>
|
|
||||||
<startBrowser>false</startBrowser>
|
|
||||||
<natEnabled>true</natEnabled>
|
|
||||||
<autoUpgradeIntervalH>0</autoUpgradeIntervalH>
|
|
||||||
<upgradeToPreReleases>false</upgradeToPreReleases>
|
|
||||||
</options>
|
|
||||||
</configuration>
|
|
2
inittab
2
inittab
@@ -1,2 +1,2 @@
|
|||||||
::respawn:/app/code/syncthing -gui-address=0.0.0.0:3000 -home=/app/data/config -no-browser >/dev/stdout 2>/dev/stderr
|
::respawn:sudo -nu cloudron /app/code/syncthing -gui-address=0.0.0.0:3000 -home=/app/data/config -no-browser >/dev/stdout 2>/dev/stderr
|
||||||
::respawn:/usr/local/nginx/sbin/nginx -c /app/code/nginx.conf
|
::respawn:/usr/local/nginx/sbin/nginx -c /app/code/nginx.conf
|
||||||
|
@@ -28,6 +28,9 @@ http {
|
|||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
proxy_cache_path /tmp/proxy_cache levels=1:2 keys_zone=my_cache:10m max_size=100m inactive=60m use_temp_path=off;
|
proxy_cache_path /tmp/proxy_cache levels=1:2 keys_zone=my_cache:10m max_size=100m inactive=60m use_temp_path=off;
|
||||||
proxy_cache my_cache;
|
proxy_cache my_cache;
|
||||||
|
auth_ldap_cache_enabled on;
|
||||||
|
auth_ldap_cache_expiration_time 300000;
|
||||||
|
auth_ldap_cache_size 100;
|
||||||
|
|
||||||
server {
|
server {
|
||||||
error_log /dev/stderr warn;
|
error_log /dev/stderr warn;
|
||||||
|
12
start.sh
12
start.sh
@@ -4,8 +4,12 @@ set -eu
|
|||||||
|
|
||||||
mkdir -p /app/data/config
|
mkdir -p /app/data/config
|
||||||
|
|
||||||
if ! [ -f /app/data/config/config.xml ]; then
|
export STNODEFAULTFOLDER=1 STNOUPGRADE=1
|
||||||
cp /app/code/config.xml.default /app/data/config/config.xml
|
|
||||||
|
# if this if the first run, generate a useful config
|
||||||
|
if [ ! -f /app/data/config/config.xml ]; then
|
||||||
|
echo "=> Generating config"
|
||||||
|
/app/code/syncthing --generate="/app/data/config"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat >/run/ldap.conf <<EOF
|
cat >/run/ldap.conf <<EOF
|
||||||
@@ -19,9 +23,11 @@ ldap_server cloudron {
|
|||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# Set the listenAddress and the gui enabled to make sure user doesnt lock themselves out by accident.
|
||||||
sed -e 's,<listenAddress>.*</listenAddress>,<listenAddress>tcp://:22000</listenAddress>,' -i /app/data/config/config.xml
|
sed -e 's,<listenAddress>.*</listenAddress>,<listenAddress>tcp://:22000</listenAddress>,' -i /app/data/config/config.xml
|
||||||
sed -e 's,<gui .*>,<gui enabled="true" tls="false" debugging="false">,' -i /app/data/config/config.xml
|
sed -e 's,<gui .*>,<gui enabled="true" tls="false" debugging="false">,' -i /app/data/config/config.xml
|
||||||
|
|
||||||
export STNODEFAULTFOLDER=1 STNOUPGRADE=1
|
chown -R cloudron:cloudron /app/data/config /app/data
|
||||||
|
|
||||||
exec busybox init
|
exec busybox init
|
||||||
|
|
||||||
|
57
test/test.js
57
test/test.js
@@ -46,64 +46,63 @@ describe('Application life cycle test', function () {
|
|||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
var LOCATION = 'syncthing-test';
|
var LOCATION = 'test';
|
||||||
var TEST_TIMEOUT = 30000;
|
var TEST_TIMEOUT = 30000;
|
||||||
var SYNC_PORT = 22001;
|
var SYNC_PORT = 22001;
|
||||||
var app;
|
var app;
|
||||||
|
|
||||||
function pageLoaded(callback) {
|
function pageLoaded() {
|
||||||
browser.wait(until.titleMatches(/[0-9a-f]{12} \| Syncthing/), TEST_TIMEOUT).then(callback);
|
return browser.wait(until.titleMatches(/[0-9a-f]{12} \| Syncthing/), TEST_TIMEOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
function visible(selector, callback) {
|
function visible(selector) {
|
||||||
return browser.wait(until.elementLocated(selector), TEST_TIMEOUT).then(function () {
|
return browser.wait(until.elementLocated(selector), TEST_TIMEOUT).then(function () {
|
||||||
browser.wait(until.elementIsVisible(browser.findElement(selector)), TEST_TIMEOUT).then(function () {
|
return browser.wait(until.elementIsVisible(browser.findElement(selector)), TEST_TIMEOUT);
|
||||||
callback();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadPage(callback) {
|
function loadPage(callback) {
|
||||||
browser.manage().deleteAllCookies();
|
browser.manage().deleteAllCookies();
|
||||||
browser.get('https://' + username + ':' + password + '@' + app.fqdn);
|
browser.get('https://' + username + ':' + password + '@' + app.fqdn);
|
||||||
pageLoaded(function() {
|
return pageLoaded().then(function() {
|
||||||
callback();
|
callback();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function addFolder(callback) {
|
function addFolder(callback) {
|
||||||
pageLoaded(function() {
|
return pageLoaded().then(function() {
|
||||||
browser.findElement(by.css('[ng-click*=addFolder]')).click();
|
browser.findElement(by.css('[ng-click*=addFolder]')).click();
|
||||||
visible(by.id('folderPath'), function() {
|
return visible(by.id('folderPath')).then(function() {
|
||||||
browser.findElement(by.id('folderLabel')).sendKeys('test').then(function() {
|
return browser.findElement(by.id('folderLabel')).sendKeys('test');
|
||||||
browser.findElement(by.id('folderPath')).sendKeys('/app/data/test').then(function() {
|
}).then(function() {
|
||||||
//Clear and re-enter the folder to avoid race with auto-completion
|
return browser.findElement(by.id('folderPath')).sendKeys('/app/data/test');
|
||||||
browser.findElement(by.id('folderPath')).clear().then(function() {
|
}).then(function() {
|
||||||
browser.findElement(by.id('folderPath')).sendKeys('/app/data/test').then(function() {
|
//Clear and re-enter the folder to avoid race with auto-completion
|
||||||
browser.findElement(by.css('[ng-click*=saveFolder]')).click().then(function() {
|
return browser.findElement(by.id('folderPath')).clear();
|
||||||
browser.wait(until.elementLocated(by.css('#folders .panel-status span[ng-switch-when=unshared]')), TEST_TIMEOUT).then(function() {
|
}).then(function() {
|
||||||
callback();
|
return browser.findElement(by.id('folderPath')).sendKeys('/app/data/test');
|
||||||
});
|
}).then(function() {
|
||||||
});
|
return browser.findElement(by.css('[ng-click*=saveFolder]')).click();
|
||||||
});
|
}).then(function() {
|
||||||
});
|
return browser.wait(until.elementLocated(by.css('#folders .panel-status span[ng-switch-when=unshared]')), TEST_TIMEOUT);
|
||||||
});
|
}).then(function() {
|
||||||
});
|
callback();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeFolder(callback) {
|
function removeFolder(callback) {
|
||||||
pageLoaded(function() {
|
browser.get('https://' + username + ':' + password + '@' + app.fqdn);
|
||||||
|
return pageLoaded().then(function() {
|
||||||
browser.findElement(by.css('#folders button')).click();
|
browser.findElement(by.css('#folders button')).click();
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
browser.findElement(by.css('#folder-0 button[ng-click*=editFolder]')).click();
|
browser.findElement(by.css('#folder-0 button[ng-click*=editFolder]')).click();
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
browser.findElement(by.css('[ng-click*=deleteFolder]')).click().then(function() {
|
browser.findElement(by.css('[ng-click*=deleteFolder]')).click().then(function() {
|
||||||
setTimeout(callback, 500); //This needs to run for some time
|
setTimeout(callback, 1000); //This needs to run for some time
|
||||||
});
|
});
|
||||||
}, 500); //No way to check for visibility of angular-js components
|
}, 1000); //No way to check for visibility of angular-js components
|
||||||
}, 500); //No way to check for visibility of angular-js components
|
}, 1000); //No way to check for visibility of angular-js components
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,7 +140,7 @@ describe('Application life cycle test', function () {
|
|||||||
|
|
||||||
it('move to different location', function () {
|
it('move to different location', function () {
|
||||||
browser.manage().deleteAllCookies();
|
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'));
|
var inspect = JSON.parse(execSync('cloudron inspect'));
|
||||||
app = inspect.apps.filter(function (a) { return a.location === LOCATION + '2'; })[0];
|
app = inspect.apps.filter(function (a) { return a.location === LOCATION + '2'; })[0];
|
||||||
expect(app).to.be.an('object');
|
expect(app).to.be.an('object');
|
||||||
|
Reference in New Issue
Block a user