Skip to content

Commit

Permalink
New port
Browse files Browse the repository at this point in the history
  • Loading branch information
HakkaOfDev committed Mar 11, 2022
1 parent dee7a48 commit c14f087
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
5 changes: 4 additions & 1 deletion client/pages/admin/workflow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ import socketIOClient from 'socket.io-client';

const WorkflowPage = () => {
const [elements, setElements] = useState<Elements>([]);
const ENDPOINT = 'http://ac-vision/ws';
const ENDPOINT = 'http://ac-vision:6969';
const toast = useToast();

useEffect(() => {
const socket = socketIOClient(ENDPOINT);
socket.on("connection", (socket) => {
console.log('connected to the ws')
});
socket.on('ONU', (data) => {
console.log(data);
fetch('http://ac-vision/api/v1.0/ressources/map/update');
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ services:
build: ./workers/logs
ports:
- "514:514/udp"
depends_on:
- proxy
volumes:
- ./workers/logs:/app
server:
Expand Down Expand Up @@ -66,6 +68,7 @@ services:
depends_on:
- worker
- database
- server
- api
- client
volumes:
Expand Down
8 changes: 0 additions & 8 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,4 @@ server {
proxy_connect_timeout 1m;
proxy_pass http://api:8000;
}

location /ws {
proxy_pass http://server:6969;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
}
4 changes: 0 additions & 4 deletions workers/server/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,14 @@
def connect(sid, environ, auth):
print('connect ', sid)


@sio.on('ONU')
def redictdata(sid, data):
print(sid, " Send : ",data)
sio.emit("ONU", data)


@sio.event
def disconnect(sid):
print('disconnect ', sid)



if __name__ == '__main__':
eventlet.wsgi.server(eventlet.listen(('0.0.0.0', 6969)), app)

0 comments on commit c14f087

Please sign in to comment.