Commit 791d05f5 authored by Dennis Willers's avatar Dennis Willers 🏀

Try the shit with Port 80

parent a03122e2
...@@ -42,6 +42,6 @@ docker-deploy: ...@@ -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
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
......
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) {
......
...@@ -2,7 +2,7 @@ const Express = require("express")(); ...@@ -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...");
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment