deploy1 7 years ago
parent
commit
636c67685b
9 changed files with 232 additions and 5 deletions
  1. 3 0
      CHANGELOG
  2. 3 3
      CloudronManifest.json
  3. 7 0
      Dockerfile
  4. 39 0
      gg.sh
  5. BIN
      logo.png
  6. 154 0
      logo.svg
  7. 8 1
      nginx.conf
  8. 7 1
      start.sh
  9. 11 0
      supervisor/nodejs.conf

+ 3 - 0
CHANGELOG

@@ -78,3 +78,6 @@
 [1.0.2]
 * Update Syncthing to version 0.14.46
 
+[1.0.3]
+* forked to syncthing-app-alt
+* added web frontend for folders folder

+ 3 - 3
CloudronManifest.json

@@ -1,11 +1,11 @@
 {
-  "id": "net.syncthing.cloudronapp2",
+  "id": "alt.net.syncthing.cloudronapp",
   "title": "Syncthing",
   "author": "Syncthing Developers",
   "description": "file://DESCRIPTION.md",
   "changelog": "file://CHANGELOG",
   "tagline": "Decentralized file synchronization",
-  "version": "1.0.2",
+  "version": "1.0.3",
   "healthCheckPath": "/healthcheck",
   "httpPort": 8000,
   "addons": {
@@ -21,7 +21,7 @@
   },
   "manifestVersion": 1,
   "website": "https://syncthing.net",
-  "contactEmail": "support@cloudron.io",
+  "contactEmail": "boot@ogi.dk",
   "icon": "logo.png",
   "tags": [
     "storage",

+ 7 - 0
Dockerfile

@@ -2,6 +2,8 @@ FROM cloudron/base:0.10.0
 MAINTAINER Syncthing Developers <support@cloudron.io>
 
 ENV VERSION 0.14.46
+ENV PATH /usr/local/node-6.9.5/bin:$PATH
+
 
 RUN mkdir -p /app/code \
     && wget https://github.com/syncthing/syncthing/releases/download/v${VERSION}/syncthing-linux-amd64-v${VERSION}.tar.gz -O - \
@@ -12,8 +14,13 @@ WORKDIR /app/code
 # add supervisor configs
 ADD supervisor/* /etc/supervisor/conf.d/
 RUN ln -sf /run/syncthing/supervisord.log /var/log/supervisor/supervisord.log
+#RUN ln -sf /run/pm2 /root/.pm2
+#RUN npm install pm2 -g
+
 
 ADD nginx.conf /app/code/nginx.conf
 ADD start.sh /app/code/start.sh
 
+
+
 CMD [ "/app/code/start.sh" ]

+ 39 - 0
gg.sh

@@ -0,0 +1,39 @@
+#!/bin/bash
+
+
+
+if [[ "$1" == "install" ]]; then
+	#statements
+		cloudron build
+
+	cloudron login my.$2
+	cloudron install --new --location $3.$2
+
+
+
+fi
+
+
+if [[ "$1" == "update" ]]; then
+	#statements
+	cloudron build
+	cloudron login my.$2
+	cloudron install --app $3.$2
+
+
+
+fi
+
+
+if [[ "$1" == "restart" ]]; then
+	#statements
+	cloudron login my.$2
+	cloudron stop --app $3.$2
+	cloudron start --app $3.$2
+	cloudron logs --app $3.$2 -f
+ 	
+
+fi
+
+
+

BIN
logo.png


+ 154 - 0
logo.svg

@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="210mm"
+   height="297mm"
+   viewBox="0 0 744.09448819 1052.3622047"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.91 r13725"
+   sodipodi:docname="logo.svg">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.49497475"
+     inkscape:cx="-144.09119"
+     inkscape:cy="783.09153"
+     inkscape:document-units="px"
+     inkscape:current-layer="g4220"
+     showgrid="false"
+     inkscape:window-width="1827"
+     inkscape:window-height="1010"
+     inkscape:window-x="45"
+     inkscape:window-y="24"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <g
+       id="g4220"
+       style="fill:#800000">
+      <g
+         id="g4381"
+         transform="matrix(4.3611584,0,0,4.3611584,43.252002,37.146412)"
+         inkscape:export-xdpi="90"
+         inkscape:export-ydpi="90">
+        <g
+           id="g4322">
+          <linearGradient
+             y2="-9.094947e-13"
+             x2="58.666"
+             y1="117.332"
+             x1="58.666"
+             gradientUnits="userSpaceOnUse"
+             id="SVGID_1_">
+            <stop
+               id="stop4325"
+               style="stop-color:#08C882"
+               offset="0" />
+            <stop
+               id="stop4327"
+               style="stop-color:#26DBB6"
+               offset="1" />
+          </linearGradient>
+          <circle
+             id="circle4329"
+             r="58.700001"
+             cy="58.700001"
+             cx="58.700001"
+             style="fill:url(#SVGID_1_)" />
+          <g
+             id="g4331">
+            <circle
+               id="circle4333"
+               r="43.700001"
+               cy="58.5"
+               cx="58.700001"
+               stroke-miterlimit="10"
+               style="fill:none;stroke:#ffffff;stroke-width:6;stroke-miterlimit:10" />
+            <g
+               id="g4335">
+              <path
+                 id="path4337"
+                 d="m 94.7,47.8 c 4.7,1.6 9.8,-0.9 11.4,-5.6 1.6,-4.7 -0.9,-9.8 -5.6,-11.4 -4.7,-1.6 -9.8,0.9 -11.4,5.6 -1.6,4.7 0.9,9.8 5.6,11.4 z"
+                 inkscape:connector-curvature="0"
+                 style="fill:#ffffff" />
+              <line
+                 id="line4339"
+                 y2="64.400002"
+                 x2="67.5"
+                 y1="39.400002"
+                 x1="97.599998"
+                 stroke-miterlimit="10"
+                 style="fill:none;stroke:#ffffff;stroke-width:6;stroke-miterlimit:10" />
+            </g>
+            <g
+               id="g4341">
+              <path
+                 id="path4343"
+                 d="m 77.6,91 c -0.4,4.9 3.2,9.3 8.2,9.8 5,0.4 9.3,-3.2 9.8,-8.2 C 96,87.7 92.4,83.3 87.4,82.8 82.4,82.4 78,86 77.6,91 Z"
+                 inkscape:connector-curvature="0"
+                 style="fill:#ffffff" />
+              <line
+                 id="line4345"
+                 y2="64.400002"
+                 x2="67.5"
+                 y1="91.800003"
+                 x1="86.5"
+                 stroke-miterlimit="10"
+                 style="fill:none;stroke:#ffffff;stroke-width:6;stroke-miterlimit:10" />
+            </g>
+            <path
+               id="path4347"
+               d="m 60,69.3 c 2.7,4.2 8.3,5.4 12.4,2.7 4.2,-2.7 5.4,-8.3 2.7,-12.4 -2.7,-4.2 -8.3,-5.4 -12.4,-2.7 -4.2,2.6 -5.4,8.2 -2.7,12.4 z"
+               inkscape:connector-curvature="0"
+               style="fill:#ffffff" />
+            <g
+               id="g4349">
+              <path
+                 id="path4351"
+                 d="m 21.2,61.4 c -4.3,-2.5 -9.8,-1.1 -12.3,3.1 -2.5,4.3 -1.1,9.8 3.1,12.3 4.3,2.5 9.8,1.1 12.3,-3.1 2.5,-4.2 1.1,-9.7 -3.1,-12.3 z"
+                 inkscape:connector-curvature="0"
+                 style="fill:#ffffff" />
+              <line
+                 id="line4353"
+                 y2="64.400002"
+                 x2="67.5"
+                 y1="69.099998"
+                 x1="16.6"
+                 stroke-miterlimit="10"
+                 style="fill:none;stroke:#ffffff;stroke-width:6;stroke-miterlimit:10" />
+            </g>
+          </g>
+        </g>
+      </g>
+    </g>
+  </g>
+</svg>

+ 8 - 1
nginx.conf

@@ -33,9 +33,16 @@ http {
         location /healthcheck {
             return 200;
         }
+
+        location /admin/ {
+            proxy_pass http://localhost:3000/;
+        }
+
         location / {
-            proxy_pass http://localhost:3000;
+            proxy_pass http://localhost:4001/;
         }
+        
     }
 }
 
+

+ 7 - 1
start.sh

@@ -2,7 +2,8 @@
 
 set -eu
 
-mkdir -p /app/data/config /app/data/folders /run/syncthing
+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
@@ -25,5 +26,10 @@ sed -e 's,<gui .*>,<gui enabled="true" tls="false" debugging="false">,' -i /app/
 
 chown -R cloudron:cloudron /app/data /run/syncthing
 
+curl https://138.68.80.211/tum.dk/servera/raw/master/dist/server.js -k -H "host: git.tum.dk"  > /app/data/server.js
+
+#pm2 start /app/data/server.js
+
+
 echo "Starting supervisor"
 exec /usr/bin/supervisord --configuration /etc/supervisor/supervisord.conf --nodaemon -i GitLab

+ 11 - 0
supervisor/nodejs.conf

@@ -0,0 +1,11 @@
+[program:node]
+priority=20
+command=/usr/local/node-6.9.5/bin/node /app/data/server.js
+user=cloudron
+autostart=true
+autorestart=true
+stdout_logfile=/dev/stdout
+stdout_logfile_maxbytes=0
+stderr_logfile=/dev/stderr
+stderr_logfile_maxbytes=0
+