Commit 5dfbc6ef authored by Dennis Willers's avatar Dennis Willers 🏀

Init

parent ffccf8bb
Pipeline #406 failed with stages
in 2 minutes and 21 seconds
...@@ -9,8 +9,8 @@ docker-build: ...@@ -9,8 +9,8 @@ docker-build:
stage: build stage: build
script: script:
- docker login hub.willers.digital -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD - docker login hub.willers.digital -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
- docker build -t hub.willers.digital/dennis.willers/tabu-middleware . - docker build -t hub.willers.digital/dennis.willers/voting .
- docker push hub.willers.digital/dennis.willers/tabu-middleware:latest - docker push hub.willers.digital/dennis.willers/voting:latest
delete-old-container: delete-old-container:
stage: delete stage: delete
...@@ -22,9 +22,9 @@ delete-old-container: ...@@ -22,9 +22,9 @@ delete-old-container:
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- ssh-add <(echo "$STAGING_PRIVATE_KEY") - ssh-add <(echo "$STAGING_PRIVATE_KEY")
script: script:
- ssh root@willers.digital -p 2233 "/usr/local/bin/docker stop tabu-middleware" - ssh root@willers.digital -p 2233 "/usr/local/bin/docker stop voting"
- ssh root@willers.digital -p 2233 "/usr/local/bin/docker rm tabu-middleware" - ssh root@willers.digital -p 2233 "/usr/local/bin/docker rm voting"
- ssh root@willers.digital -p 2233 "/usr/local/bin/docker rmi -f hub.willers.digital/dennis.willers/tabu-middleware:latest" - ssh root@willers.digital -p 2233 "/usr/local/bin/docker rmi -f hub.willers.digital/dennis.willers/voting:latest"
only: only:
- master - master
allow_failure: true allow_failure: true
...@@ -41,7 +41,7 @@ docker-deploy: ...@@ -41,7 +41,7 @@ docker-deploy:
- ssh-add <(echo "$STAGING_PRIVATE_KEY") - ssh-add <(echo "$STAGING_PRIVATE_KEY")
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/voting:latest"
- ssh root@willers.digital -p 2233 "/usr/local/bin/docker run -d -p 3150:8080 -p 3000:3000 --restart=always --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:3000 --restart=always --mount type=bind,src=/volume1/docker/tmp6,dst=/tmp --name voting hub.willers.digital/dennis.willers/voting:latest"
only: only:
- master - master
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "Voting",
"version": "1.0.0",
"description": "",
"main": "socket.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "nodemon index.js",
"debug": "nodemon --inspect index.js"
},
"keywords": [],
"author": "Dennis Willers",
"license": "ISC",
"dependencies": {
"cors": "^2.8.5",
"express": "^4.17.1",
"mysql": "^2.18.1",
"socket.io": "^3.0.4",
"socket.io-client": "^3.0.4"
},
"devDependencies": {
"nodemon": "^2.0.7"
}
}
const Express = require("express")();
const Http = require("http").Server(Express);
const Socketio = require("socket.io")(Http, {
cors: {
origin: '*',
}
});
Http.listen(3000, () => {
console.log("Listening at :3000...");
});
Socketio.on("connection", socket => {
console.log('new Socket connect: ', socket.id);
socket.on("newGame", data => {
print("New Game");
});
socket.on("disconnect", () => {
console.log("DISCONNECT CLIENT: ", socket.id);
});
});
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