Loading .gitlab-ci.yml +1 −1 Original line number Original line Diff line number Diff line Loading @@ -42,6 +42,6 @@ docker-deploy: script: script: - ssh root@willers.digital -p 2233 "/usr/local/bin/docker login hub.willers.digital -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD" - ssh root@willers.digital -p 2233 "/usr/local/bin/docker login hub.willers.digital -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD" - ssh root@willers.digital -p 2233 "/usr/local/bin/docker pull hub.willers.digital/dennis.willers/tabu-middleware:latest" - ssh root@willers.digital -p 2233 "/usr/local/bin/docker pull hub.willers.digital/dennis.willers/tabu-middleware:latest" - ssh root@willers.digital -p 2233 "/usr/local/bin/docker run -d -p 3150:8080 -p 3000:3000 --restart=on-failure:5 --mount type=bind,src=/volume1/docker/tmp6,dst=/tmp --name tabu-middleware hub.willers.digital/dennis.willers/tabu-middleware:latest" - ssh root@willers.digital -p 2233 "/usr/local/bin/docker run -d -p 3150:8080 -p 3000:80 --restart=on-failure:5 --mount type=bind,src=/volume1/docker/tmp6,dst=/tmp --name tabu-middleware hub.willers.digital/dennis.willers/tabu-middleware:latest" only: only: - master - master Dockerfile +1 −1 Original line number Original line Diff line number Diff line FROM node:12.18.1 FROM node:12.18.1 ENV NODE_ENV=production ENV NODE_ENV=production EXPOSE 8080 EXPOSE 8080 EXPOSE 3000 EXPOSE 80 WORKDIR /app WORKDIR /app COPY ["package.json", "package-lock.json*", "./"] COPY ["package.json", "package-lock.json*", "./"] RUN npm install --production RUN npm install --production Loading events.js +10 −5 Original line number Original line Diff line number Diff line const express = require('express'); const express = require('express'); const io = require("socket.io-client"); const io = require("socket.io-client"); const socket = io('http://localhost:3000'); //const socket = io('ws://tabu-server.willers.digital'); const socket = io('ws://localhost:80'); function createRouter(db) { function createRouter(db) { const router = express.Router(); const router = express.Router(); socket.on('Test:newRound', (data) => { console.log('NEW ROUND FROM: ', data) }); socket.on('Test:endRound', (data) => { console.log('END ROUND FROM: ', data) }); const isTrue = function(req, res) { const isTrue = function(req, res) { res.status(200).json({status: 'true'}); res.status(200).json({status: 'true'}); }; }; const wait = function () { setTimeout(null, 60000); }; const isSession = function isSession(req, res, next) { const isSession = function isSession(req, res, next) { const spielname = req.body.spielname; const spielname = req.body.spielname; if (spielname.match(/^[0-9a-zA-Z]+$/) != null) { if (spielname.match(/^[0-9a-zA-Z]+$/) != null) { Loading socket.js +1 −1 Original line number Original line Diff line number Diff line Loading @@ -2,7 +2,7 @@ const Express = require("express")(); const Http = require("http").Server(Express); const Http = require("http").Server(Express); const Socketio = require("socket.io")(Http); const Socketio = require("socket.io")(Http); Http.listen(3000, () => { Http.listen(80, () => { console.log("Listening at :3000..."); console.log("Listening at :3000..."); }); }); Loading Loading
.gitlab-ci.yml +1 −1 Original line number Original line Diff line number Diff line Loading @@ -42,6 +42,6 @@ docker-deploy: script: script: - ssh root@willers.digital -p 2233 "/usr/local/bin/docker login hub.willers.digital -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD" - ssh root@willers.digital -p 2233 "/usr/local/bin/docker login hub.willers.digital -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD" - ssh root@willers.digital -p 2233 "/usr/local/bin/docker pull hub.willers.digital/dennis.willers/tabu-middleware:latest" - ssh root@willers.digital -p 2233 "/usr/local/bin/docker pull hub.willers.digital/dennis.willers/tabu-middleware:latest" - ssh root@willers.digital -p 2233 "/usr/local/bin/docker run -d -p 3150:8080 -p 3000:3000 --restart=on-failure:5 --mount type=bind,src=/volume1/docker/tmp6,dst=/tmp --name tabu-middleware hub.willers.digital/dennis.willers/tabu-middleware:latest" - ssh root@willers.digital -p 2233 "/usr/local/bin/docker run -d -p 3150:8080 -p 3000:80 --restart=on-failure:5 --mount type=bind,src=/volume1/docker/tmp6,dst=/tmp --name tabu-middleware hub.willers.digital/dennis.willers/tabu-middleware:latest" only: only: - master - master
Dockerfile +1 −1 Original line number Original line Diff line number Diff line FROM node:12.18.1 FROM node:12.18.1 ENV NODE_ENV=production ENV NODE_ENV=production EXPOSE 8080 EXPOSE 8080 EXPOSE 3000 EXPOSE 80 WORKDIR /app WORKDIR /app COPY ["package.json", "package-lock.json*", "./"] COPY ["package.json", "package-lock.json*", "./"] RUN npm install --production RUN npm install --production Loading
events.js +10 −5 Original line number Original line Diff line number Diff line const express = require('express'); const express = require('express'); const io = require("socket.io-client"); const io = require("socket.io-client"); const socket = io('http://localhost:3000'); //const socket = io('ws://tabu-server.willers.digital'); const socket = io('ws://localhost:80'); function createRouter(db) { function createRouter(db) { const router = express.Router(); const router = express.Router(); socket.on('Test:newRound', (data) => { console.log('NEW ROUND FROM: ', data) }); socket.on('Test:endRound', (data) => { console.log('END ROUND FROM: ', data) }); const isTrue = function(req, res) { const isTrue = function(req, res) { res.status(200).json({status: 'true'}); res.status(200).json({status: 'true'}); }; }; const wait = function () { setTimeout(null, 60000); }; const isSession = function isSession(req, res, next) { const isSession = function isSession(req, res, next) { const spielname = req.body.spielname; const spielname = req.body.spielname; if (spielname.match(/^[0-9a-zA-Z]+$/) != null) { if (spielname.match(/^[0-9a-zA-Z]+$/) != null) { Loading
socket.js +1 −1 Original line number Original line Diff line number Diff line Loading @@ -2,7 +2,7 @@ const Express = require("express")(); const Http = require("http").Server(Express); const Http = require("http").Server(Express); const Socketio = require("socket.io")(Http); const Socketio = require("socket.io")(Http); Http.listen(3000, () => { Http.listen(80, () => { console.log("Listening at :3000..."); console.log("Listening at :3000..."); }); }); Loading