mirror of
https://git.cloudron.io/cloudron/syncthing-app
synced 2025-09-13 08:19:09 +00:00
Compare commits
23 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
ef295ffb0b | ||
|
0a1c5ceed2 | ||
|
23f4e2abd9 | ||
|
af1a53e0ca | ||
|
8ba346c847 | ||
|
1f12c096f8 | ||
|
5358d94cb0 | ||
|
eb3c1d27dc | ||
|
7d9d8049d0 | ||
|
ac1fe56e47 | ||
|
dc08b5314d | ||
|
46177b5ad6 | ||
|
def7b55560 | ||
|
a13b1dcdaf | ||
|
3b9ef649d8 | ||
|
fb8bb68aa8 | ||
|
f62a05aa0b | ||
|
20046fe36c | ||
|
6dbe2e26a7 | ||
|
97d8f69a5e | ||
|
419b00c215 | ||
|
3f3e348b76 | ||
|
a794bad5a5 |
35
CHANGELOG
35
CHANGELOG
@@ -142,3 +142,38 @@
|
||||
[1.6.2]
|
||||
* Update Syncthing to 1.3.3
|
||||
|
||||
[1.6.3]
|
||||
* Update Syncthing to 1.3.4
|
||||
|
||||
[1.7.0]
|
||||
* Update Syncthing to 1.4.0
|
||||
|
||||
[1.7.1]
|
||||
* Update Syncthing to 1.4.1
|
||||
|
||||
[1.7.2]
|
||||
* Update Syncthing to 1.4.2
|
||||
|
||||
[1.8.0]
|
||||
* Update Syncthing to 1.5.0
|
||||
* Update to new Cloudron base image
|
||||
|
||||
[1.9.0]
|
||||
* Update Syncthing to 1.6.1
|
||||
|
||||
[1.10.0]
|
||||
* Update Syncthing to 1.7.1
|
||||
* [Full changelog](https://github.com/syncthing/syncthing/releases/tag/v1.7.0)
|
||||
* #6552: panic: Stop called more than once on ... created by nat.Service
|
||||
* #6564: Closing an already removed connection causes GUI error message
|
||||
* #6646: Misleading error message when to be deleted dir contains receive-only changes
|
||||
* #6653: panic: nil pointer dereference in leveldb.(*DB).isClosed()
|
||||
|
||||
[1.11.0]
|
||||
* Update Syncthing to 1.9.0
|
||||
* [Full changelog](https://github.com/syncthing/syncthing/releases/tag/v1.9.0)
|
||||
* Offline nodes after drive replacement automatically heal and join back into the cluster, refer #10416
|
||||
* Listing improvements with parallel disk.Walk calls across many nodes, refer #10420
|
||||
* certs now supports multiple domains for TLS termination, refer #10207
|
||||
* Context now passed around at storage layer for future context support, refer #10321
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
"description": "file://DESCRIPTION.md",
|
||||
"changelog": "file://CHANGELOG",
|
||||
"tagline": "Decentralized file synchronization",
|
||||
"version": "1.6.2",
|
||||
"version": "1.11.0",
|
||||
"healthCheckPath": "/healthcheck",
|
||||
"httpPort": 8000,
|
||||
"addons": {
|
||||
@@ -27,12 +27,13 @@
|
||||
"storage",
|
||||
"sync"
|
||||
],
|
||||
"minBoxVersion": "4.1.4",
|
||||
"minBoxVersion": "5.3.0",
|
||||
"forumUrl": "https://forum.cloudron.io/category/56/syncthing",
|
||||
"documentationUrl": "https://cloudron.io/documentation/apps/syncthing/",
|
||||
"mediaLinks": [
|
||||
"https://s3.amazonaws.com/cloudron-app-screenshots/net.syncthing.cloudronapp2/53bc9300d71bb5bf32362f8213194a0c3a415429/1.png",
|
||||
"https://s3.amazonaws.com/cloudron-app-screenshots/net.syncthing.cloudronapp2/53bc9300d71bb5bf32362f8213194a0c3a415429/2.png",
|
||||
"https://s3.amazonaws.com/cloudron-app-screenshots/net.syncthing.cloudronapp2/53bc9300d71bb5bf32362f8213194a0c3a415429/3.png"
|
||||
"https://cloudron-app-screenshots.s3.amazonaws.com/net.syncthing.cloudronapp2/53bc9300d71bb5bf32362f8213194a0c3a415429/1.png",
|
||||
"https://cloudron-app-screenshots.s3.amazonaws.com/net.syncthing.cloudronapp2/53bc9300d71bb5bf32362f8213194a0c3a415429/2.png",
|
||||
"https://cloudron-app-screenshots.s3.amazonaws.com/net.syncthing.cloudronapp2/53bc9300d71bb5bf32362f8213194a0c3a415429/3.png"
|
||||
],
|
||||
"postInstallMessage": "file://POSTINSTALL.md"
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
This app packages Syncthing <upstream>1.3.3</upstream>.
|
||||
This app packages Syncthing <upstream>1.9.0</upstream>.
|
||||
|
||||
Syncthing replaces proprietary sync and cloud services with something open, trustworthy and decentralized. Your data is your data alone and you deserve to choose where it is stored, if it is shared with some third party and how it's transmitted over the Internet.
|
||||
|
||||
|
13
Dockerfile
13
Dockerfile
@@ -1,17 +1,16 @@
|
||||
FROM cloudron/base:1.0.0@sha256:147a648a068a2e746644746bbfb42eb7a50d682437cead3c67c933c546357617
|
||||
FROM cloudron/base:2.0.0@sha256:f9fea80513aa7c92fe2e7bf3978b54c8ac5222f47a9a32a7f8833edf0eb5a4f4
|
||||
|
||||
ARG VERSION=1.3.3
|
||||
RUN mkdir -p /app/code \
|
||||
&& wget https://github.com/syncthing/syncthing/releases/download/v${VERSION}/syncthing-linux-amd64-v${VERSION}.tar.gz -O - \
|
||||
| tar -xz -C /app/code --strip-components=1
|
||||
ARG VERSION=1.9.0
|
||||
|
||||
RUN mkdir -p /app/code
|
||||
WORKDIR /app/code
|
||||
|
||||
RUN wget https://github.com/syncthing/syncthing/releases/download/v${VERSION}/syncthing-linux-amd64-v${VERSION}.tar.gz -O - | tar -xz -C /app/code --strip-components=1
|
||||
|
||||
# add supervisor configs
|
||||
ADD supervisor/* /etc/supervisor/conf.d/
|
||||
RUN ln -sf /run/syncthing/supervisord.log /var/log/supervisor/supervisord.log
|
||||
|
||||
ADD nginx.conf /app/code/nginx.conf
|
||||
ADD start.sh /app/code/start.sh
|
||||
ADD nginx.conf start.sh /app/code/
|
||||
|
||||
CMD [ "/app/code/start.sh" ]
|
||||
|
@@ -1,8 +1,7 @@
|
||||
Use the following credentials for initial setup:
|
||||
This app is pre-setup with an admin account. The initial credentials are:
|
||||
|
||||
`username`: admin
|
||||
**Username**: admin <br/>
|
||||
**Password**: changeme <br/>
|
||||
|
||||
`password`: changeme
|
||||
|
||||
**Please change the admin password on first login**
|
||||
Please change the admin password immediately.
|
||||
|
||||
|
4
start.sh
4
start.sh
@@ -5,11 +5,11 @@ set -eu
|
||||
mkdir -p /app/data/config /app/data/folders /run/syncthing
|
||||
|
||||
# if this if the first run, generate a useful config
|
||||
if [ ! -f /app/data/config/config.xml ]; then
|
||||
if [[ ! -f /app/data/config/config.xml ]]; then
|
||||
echo "=> Generating config"
|
||||
STNODEFAULTFOLDER=1 /app/code/syncthing --generate="/app/data/config"
|
||||
|
||||
# The password value was determined by reading config.xml and setting value in the GUI
|
||||
# The password value (changeme) was determined by reading config.xml and setting value in the GUI
|
||||
# urAccepted is 0 for not decided, -1 for no reporting
|
||||
xmlstarlet ed --inplace \
|
||||
--subnode "//configuration/gui" -t elem -n user -v "admin" \
|
||||
|
1425
test/package-lock.json
generated
1425
test/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -9,14 +9,13 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"chromedriver": "^79.0.0",
|
||||
"ejs": "^3.0.1",
|
||||
"chromedriver": "^85.0.0",
|
||||
"expect.js": "^0.3.1",
|
||||
"mkdirp": "^0.5.1",
|
||||
"mocha": "^7.0.0",
|
||||
"rimraf": "^3.0.0",
|
||||
"mkdirp": "^1.0.4",
|
||||
"mocha": "^8.1.3",
|
||||
"rimraf": "^3.0.2",
|
||||
"selenium-server-standalone-jar": "^3.141.59",
|
||||
"selenium-webdriver": "^3.6.0",
|
||||
"superagent": "^5.2.1"
|
||||
"superagent": "^6.1.0"
|
||||
}
|
||||
}
|
||||
|
89
test/test.js
89
test/test.js
@@ -2,6 +2,11 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/* global describe */
|
||||
/* global before */
|
||||
/* global after */
|
||||
/* global it */
|
||||
|
||||
require('chromedriver');
|
||||
|
||||
var execSync = require('child_process').execSync,
|
||||
@@ -15,15 +20,6 @@ var by = require('selenium-webdriver').By,
|
||||
Key = require('selenium-webdriver').Key,
|
||||
Builder = require('selenium-webdriver').Builder;
|
||||
|
||||
var accessKey = 'admin',
|
||||
secretKey = 'secretkey';
|
||||
|
||||
var bucket_prefix = 'bucket',
|
||||
bucket_id = 0,
|
||||
bucket;
|
||||
|
||||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
||||
|
||||
describe('Application life cycle test', function () {
|
||||
this.timeout(0);
|
||||
|
||||
@@ -49,10 +45,14 @@ describe('Application life cycle test', function () {
|
||||
var TEST_TIMEOUT = 30000;
|
||||
var FOLDER = 'xmf'; // keep this small. long folder names fail in automation, not sure why
|
||||
var SYNC_PORT = 22001;
|
||||
var EXEC_ARGS = { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' };
|
||||
|
||||
var app;
|
||||
|
||||
function installApp() {
|
||||
execSync('cloudron install --port-bindings SYNC_PORT=' + SYNC_PORT + ' --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||
function getAppInfo() {
|
||||
var inspect = JSON.parse(execSync('cloudron inspect'));
|
||||
app = inspect.apps.filter(function (a) { return a.location === LOCATION || a.location === LOCATION + '2'; })[0];
|
||||
expect(app).to.be.an('object');
|
||||
}
|
||||
|
||||
function pageLoaded() {
|
||||
@@ -75,6 +75,8 @@ describe('Application life cycle test', function () {
|
||||
|
||||
function loadPage(callback) {
|
||||
browser.manage().deleteAllCookies().then(function () {
|
||||
return browser.sleep(10000);
|
||||
}).then(function() {
|
||||
return browser.get('https://' + username + ':' + encodeURIComponent(password) + '@' + app.fqdn).then(function () {
|
||||
return browser.get('https://' + app.fqdn);
|
||||
});
|
||||
@@ -139,65 +141,54 @@ describe('Application life cycle test', function () {
|
||||
});
|
||||
}
|
||||
|
||||
xit('build app', function () {
|
||||
execSync('cloudron build', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||
});
|
||||
xit('build app', function () { execSync('cloudron build', EXEC_ARGS); });
|
||||
|
||||
it('install app', installApp);
|
||||
|
||||
it('can get app information', function () {
|
||||
var inspect = JSON.parse(execSync('cloudron inspect'));
|
||||
|
||||
app = inspect.apps.filter(function (a) { return a.location === LOCATION; })[0];
|
||||
|
||||
expect(app).to.be.an('object');
|
||||
});
|
||||
it('install app', function () { execSync('cloudron install --port-bindings SYNC_PORT=' + SYNC_PORT + ' --location ' + LOCATION, EXEC_ARGS); });
|
||||
it('can get app information', getAppInfo);
|
||||
|
||||
it('fails with invalid password', invalidPassword);
|
||||
it('can load page', loadPage);
|
||||
it('can add folder', addFolder);
|
||||
|
||||
it('backup app', function () {
|
||||
execSync('cloudron backup create --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||
});
|
||||
|
||||
it('restore app', function () {
|
||||
execSync('cloudron restore --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||
});
|
||||
it('backup app', function () { execSync('cloudron backup create --app ' + app.id, EXEC_ARGS); });
|
||||
it('restore app', function () { execSync('cloudron restore --app ' + app.id, EXEC_ARGS); });
|
||||
|
||||
it('can load page', loadPage);
|
||||
it('can check folder', checkFolder);
|
||||
|
||||
it('move to different location', function () {
|
||||
browser.manage().deleteAllCookies();
|
||||
execSync('cloudron configure --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('move to different location', function (done) {
|
||||
// ensure we don't hit NXDOMAIN in the mean time
|
||||
browser.get('about:blank').then(function () {
|
||||
execSync(`cloudron configure --location ${LOCATION}2 --app ${app.id}`, EXEC_ARGS);
|
||||
done();
|
||||
});
|
||||
});
|
||||
it('can get app information', getAppInfo);
|
||||
|
||||
it('can load page', loadPage);
|
||||
it('can check folder', checkFolder);
|
||||
it('can remove folder', removeFolder);
|
||||
|
||||
it('uninstall app', function () {
|
||||
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||
it('uninstall app', function (done) {
|
||||
browser.get('about:blank').then(function () {
|
||||
execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
// test update
|
||||
it('can install app', function () {
|
||||
execSync('cloudron install --appstore-id net.syncthing.cloudronapp2 --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||
var inspect = JSON.parse(execSync('cloudron inspect'));
|
||||
app = inspect.apps.filter(function (a) { return a.location === LOCATION; })[0];
|
||||
expect(app).to.be.an('object');
|
||||
});
|
||||
it('can install app', function () { execSync('cloudron install --port-bindings SYNC_PORT=' + SYNC_PORT + ' --appstore-id net.syncthing.cloudronapp2 --location ' + LOCATION, EXEC_ARGS); });
|
||||
it('can get app information', getAppInfo);
|
||||
it('can load page', loadPage);
|
||||
it('can add folder', addFolder);
|
||||
it('can update', function () {
|
||||
execSync('cloudron update --app ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||
});
|
||||
it('can update', function () { execSync('cloudron update --app ' + LOCATION, EXEC_ARGS); });
|
||||
it('wait for app to startup fully', function (done) { setTimeout(done, 10000); });
|
||||
it('can check folder', checkFolder);
|
||||
it('uninstall app', function () {
|
||||
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||
|
||||
it('uninstall app', function (done) {
|
||||
browser.get('about:blank').then(function () {
|
||||
execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user