deploy1 6 éve
szülő
commit
1c619873cc
9 módosított fájl, 156 hozzáadás és 0 törlés
  1. 2 0
      .gitignore
  2. 0 0
      CHANGELOG
  3. 35 0
      CloudronManifest.json
  4. 0 0
      DESCRIPTION.md
  5. 51 0
      Dockerfile
  6. 0 0
      VERSION
  7. 6 0
      index.js
  8. 15 0
      package.json
  9. 47 0
      start.sh

+ 2 - 0
.gitignore

@@ -0,0 +1,2 @@
+.dbuild
+data/

+ 0 - 0
CHANGELOG


+ 35 - 0
CloudronManifest.json

@@ -0,0 +1,35 @@
+{
+    "id": "dk.tum.datserver",
+    "title": "datserver app",
+    "author": "boot",
+    "description": "file://DESCRIPTION.md",
+    "changelog": "./CHANGELOG",
+    "tagline": "datserver",
+    "version": "1.0.0",
+    "healthCheckPath": "/healthcheck",
+    "httpPort": 3000,
+    "addons": {
+        "ldap": {},
+        "localstorage": {}
+    },
+    "tcpPorts": {
+        "S_PORT": {
+            "title": "S Port",
+            "description": "S Port.",
+            "defaultValue": 12009
+        },
+        "B_PORT": {
+            "title": "B Port",
+            "description": "B Port.",
+            "defaultValue": 3282
+        }
+    },
+    "manifestVersion": 1,
+    "website": "https://ogi.dk",
+    "contactEmail": "boot@ogi.dk",
+    "icon": "logo.png",
+    "tags": [
+        "datserver"
+    ],
+    "mediaLinks": []
+}

+ 0 - 0
DESCRIPTION.md


+ 51 - 0
Dockerfile

@@ -0,0 +1,51 @@
+FROM docker.iske.dk/base
+
+RUN mkdir -p /app/code
+WORKDIR /app/code
+
+#RUN ln /
+
+RUN apt-get update -y 
+
+RUN npm install -g hypercored
+#RUN npm install -g dat
+#RUN npm install -g pm2  
+
+#WORKDIR /app
+#RUN npm install https://git.tum.dk/tum.dk/aserver/archive/v0.0.14.tar.gz
+
+RUN ln -s /usr/local/node-8.12.0/bin/node /usr/bin/node
+
+
+RUN npm install -g https://git.tum.dk/tum.dk/servera/archive/v0.0.12.tar.gz --unsafe-perm
+
+
+
+#RUN curl -L https://git.tum.dk/tum.dk/aserver/archive/v0.0.1.tar.gz | tar -vxz --strip-components 1 -f -
+
+#RUN npm install 
+
+
+
+# node_modules have to be in data to allow plugins to be installable at runtime
+#RUN cd /app/code/src && npm install && \
+#    ln -s /app/data/node_modules /app/code/node_modules
+
+# https://github.com/ether/etherpad-lite/issues/2683
+#RUN touch src/.ep_initialized
+
+#COPY settings.json.template /app/code/settings.json.template
+#RUN mv src/static/custom src/static/custom_templates && ln -s /app/data/custom src/static/custom
+
+# make these writable (var is used for cache)
+# node_modules contains plugins, the etherpad code is only linked into /app/data/node_modules
+#RUN ln -s /app/data/APIKEY.txt /app/code/APIKEY.txt && \
+#    ln -s /app/data/SESSIONKEY.txt /app/code/SESSIONKEY.txt && \
+#    rm -rf /app/code/var && ln -s /run/etherpad-lite/var /app/code/var && \
+#    rm -rf /home/cloudron/.npm && ln -s /tmp/.npm /home/cloudron/.npm && \
+#    rm -rf /root/.npm && ln -s /tmp/.npm /root/.npm
+COPY index.js /app/code/
+
+COPY start.sh /app/code/
+
+CMD [ "/app/code/start.sh" ]

+ 0 - 0
VERSION


+ 6 - 0
index.js

@@ -0,0 +1,6 @@
+var http = require('http');
+http.createServer(function (req, res) {
+  res.writeHead(200, {'Content-Type': 'text/plain'});
+  res.write('ok');
+  res.end();
+}).listen(3000);

+ 15 - 0
package.json

@@ -0,0 +1,15 @@
+{
+  "name": "datserver",
+  "version": "1.0.0",
+  "description": "",
+  "main": "index.js",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "repository": {
+    "type": "git",
+    "url": "ssh://git@git.tum.dk/tum.dk/datserver.git"
+  },
+  "author": "",
+  "license": "ISC"
+}

+ 47 - 0
start.sh

@@ -0,0 +1,47 @@
+#!/bin/bash
+
+echo "START"
+
+
+if [[ ! -f /app/data/feeds ]]; then
+	echo "dat://0b8c56d3dcf9e3eae168a883cc131e1e6a1780172ff3f53f0c60abcf4cac2436" > /app/data/feeds
+fi
+
+cd /app/data
+
+ 
+hypercored &
+
+echo $(which node) $PATH
+
+
+#node /app/code/index.js
+
+
+servera --verbose
+
+
+
+#dat dat://0b8c56d3dcf9e3eae168a883cc131e1e6a1780172ff3f53f0c60abcf4cac2436 ./demo 
+
+#cd ./demo 
+#dat pull
+
+
+
+
+#if [[ -f ./demo/server.js ]]; then
+#	node ./demo/server.js
+#
+#else
+#	echo "no server"
+#fi
+
+
+
+
+
+
+
+
+