Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Tabu-Middleware
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dennis Willers
Tabu-Middleware
Commits
791d05f5
Commit
791d05f5
authored
Dec 31, 2020
by
Dennis Willers
🏀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try the shit with Port 80
parent
a03122e2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
8 deletions
+13
-8
.gitlab-ci.yml
.gitlab-ci.yml
+1
-1
Dockerfile
Dockerfile
+1
-1
events.js
events.js
+10
-5
socket.js
socket.js
+1
-1
No files found.
.gitlab-ci.yml
View file @
791d05f5
...
...
@@ -42,6 +42,6 @@ docker-deploy:
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 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:
300
0 --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:
8
0 --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
:
-
master
Dockerfile
View file @
791d05f5
FROM
node:12.18.1
ENV
NODE_ENV=production
EXPOSE
8080
EXPOSE
300
0
EXPOSE
8
0
WORKDIR
/app
COPY
["package.json", "package-lock.json*", "./"]
RUN
npm
install
--production
...
...
events.js
View file @
791d05f5
const
express
=
require
(
'
express
'
);
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
)
{
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
)
{
res
.
status
(
200
).
json
({
status
:
'
true
'
});
};
const
wait
=
function
()
{
setTimeout
(
null
,
60000
);
};
const
isSession
=
function
isSession
(
req
,
res
,
next
)
{
const
spielname
=
req
.
body
.
spielname
;
if
(
spielname
.
match
(
/^
[
0-9a-zA-Z
]
+$/
)
!=
null
)
{
...
...
socket.js
View file @
791d05f5
...
...
@@ -2,7 +2,7 @@ const Express = require("express")();
const
Http
=
require
(
"
http
"
).
Server
(
Express
);
const
Socketio
=
require
(
"
socket.io
"
)(
Http
);
Http
.
listen
(
300
0
,
()
=>
{
Http
.
listen
(
8
0
,
()
=>
{
console
.
log
(
"
Listening at :3000...
"
);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment