Merge branch 'master' into 'master'

Uses Syncthing Generated Request

Closes #2

See merge request !1
This commit is contained in:
dswd 2017-06-10 09:22:25 +00:00
commit ef92705074
5 changed files with 15 additions and 21 deletions

View File

@ -9,3 +9,7 @@
[0.1.3]
* Updated postinstall message
[0.1.4]
* Uses syncthing generated config
* Bumps to version 0.14.29

View File

@ -5,7 +5,7 @@
"description": "file://DESCRIPTION.md",
"changelog": "file://CHANGELOG",
"tagline": "Decentralized file synchronization",
"version": "0.1.3",
"version": "0.1.4",
"healthCheckPath": "/check",
"httpPort": 8000,
"addons": {
@ -21,7 +21,7 @@
}
},
"manifestVersion": 1,
"website": "http://syncthing.net",
"website": "https://syncthing.net",
"contactEmail": "support@cloudron.io",
"icon": "logo.png",
"tags": [

View File

@ -28,7 +28,7 @@ RUN ./configure \
--build=cloudron-river
RUN make install
ENV VERSION 0.14.27
ENV VERSION 0.14.29
RUN mkdir -p /app/code \
&& 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
ADD nginx.conf /app/code/nginx.conf
ADD config.xml /app/code/config.xml.default
ADD inittab /etc/inittab
ADD start.sh /app/code/start.sh

View File

@ -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>

View File

@ -3,9 +3,14 @@
set -eu
mkdir -p /app/data/config
chown -R cloudron:cloudron /app/data/config /app/data &
if ! [ -f /app/data/config/config.xml ]; then
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"
# don't take the whole volume with the default so that we can add additional folders
sed -i "s/path=\"\/root\/Sync\/\" /path=\"\/app\/data\/default\/\"/g" /app/data/config/config.xml
fi
cat >/run/ldap.conf <<EOF
@ -19,6 +24,7 @@ ldap_server cloudron {
}
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,<gui .*>,<gui enabled="true" tls="false" debugging="false">,' -i /app/data/config/config.xml