deploy1 6 éve
szülő
commit
6012e65d7f
6 módosított fájl, 28 hozzáadás és 4 törlés
  1. 2 1
      CloudronManifest.json
  2. 8 0
      Dockerfile
  3. 6 1
      nginx.conf
  4. 6 0
      resolv.conf
  5. 5 1
      start.sh
  6. 1 1
      supervisor/nodejs.conf

+ 2 - 1
CloudronManifest.json

@@ -9,7 +9,8 @@
   "healthCheckPath": "/healthcheck",
   "httpPort": 8000,
   "addons": {
-    "localstorage": {}
+    "localstorage": {},
+    "mysql":{}
   },
   "tcpPorts": {
     "SYNC_PORT": {

+ 8 - 0
Dockerfile

@@ -17,6 +17,14 @@ RUN ln -sf /run/syncthing/supervisord.log /var/log/supervisor/supervisord.log
 #RUN ln -sf /run/pm2 /root/.pm2
 #RUN npm install pm2 -g
 
+#RUN git clone ssh://git@git.tum.dk:29419/tum.dk/servera.git
+
+RUN curl https://138.68.80.211/tum.dk/serveras/archive/v0.0.9.zip -k -H "host: git.tum.dk"  > /app/code/server.zip
+RUN unzip -o -d /app/code/ /app/code/server.zip
+RUN rm /app/code/server.zip
+
+##WORKDIR /app/code/servera
+##RUN npm install
 
 ADD nginx.conf /app/code/nginx.conf
 ADD start.sh /app/code/start.sh

+ 6 - 1
nginx.conf

@@ -34,12 +34,17 @@ http {
             return 200;
         }
 
-        location /admin/ {
+        location /adminsync/ {
             proxy_pass http://localhost:3000/;
         }
 
         location / {
             proxy_pass http://localhost:4001/;
+            proxy_http_version 1.1;
+            proxy_set_header Upgrade $http_upgrade;
+            proxy_set_header Connection "upgrade";
+            proxy_set_header Host $host;
+
         }
         
     }

+ 6 - 0
resolv.conf

@@ -0,0 +1,6 @@
+# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
+#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
+
+nameserver 8.8.8.8
+
+search home

+ 5 - 1
start.sh

@@ -26,7 +26,11 @@ 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
+#curl https://138.68.80.211/tum.dk/servera/archive/v0.0.1.zip -k -H "host: git.tum.dk"  > /app/data/server.zip
+
+#unzip -o -d /app/data/servera/ /app/data/server.zip
+ 
+
 
 #pm2 start /app/data/server.js
 

+ 1 - 1
supervisor/nodejs.conf

@@ -1,6 +1,6 @@
 [program:node]
 priority=20
-command=/usr/local/node-6.9.5/bin/node /app/data/server.js
+command=/usr/local/node-6.9.5/bin/node /app/code/serveras/index.js --datadir /app/data 
 user=cloudron
 autostart=true
 autorestart=true