Skip to content

Commit

Permalink
working SSE in compose
Browse files Browse the repository at this point in the history
  • Loading branch information
matmut7 committed Jul 22, 2023
1 parent 43a23f6 commit 4e589e1
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 56 deletions.
26 changes: 26 additions & 0 deletions deploy/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
services:
nginx:
image: nginx:alpine
environment:
- TZ=Europe/Paris
ports:
- 80:80
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf

contmi-client:
# image: ghcr.io/matmut7/contmi/client:latest
build:
context: ../
dockerfile: ./packages/client/Dockerfile

contmi-server:
# image: ghcr.io/matmut7/contmi/server:latest
build:
context: ../
dockerfile: ./packages/server/Dockerfile
volumes:
- contmi:/app/packages/server/dbs

volumes:
contmi:
32 changes: 32 additions & 0 deletions deploy/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
resolver 127.0.0.11 valid=1s ipv6=off;

server {
server_name _;
listen 80 default_server;

location / {
set $contmi_client contmi-client;
proxy_pass http://$contmi_client:80;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

location /sync {
set $contmi_server contmi-server;
proxy_pass http://$contmi_server:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
}


}

6 changes: 3 additions & 3 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.11.16",
"@mui/material": "^5.13.6",
"@vlcn.io/crsqlite-wasm": "^0.13.0",
"@vlcn.io/direct-connect-browser": "^0.3.0",
"@vlcn.io/react": "^2.3.0",
"@vlcn.io/crsqlite-wasm": "^0.14.0",
"@vlcn.io/direct-connect-browser": "^0.4.0",
"@vlcn.io/react": "^2.4.0",
"lodash": "^4.17.21",
"nanoid": "^4.0.2",
"react": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/hooks/useDbId.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export function useDbId() {
return "test";
return "2A6FBCD93EACD7F1";
}
4 changes: 2 additions & 2 deletions packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
]
},
"dependencies": {
"@vlcn.io/direct-connect-common": "^0.4.0",
"@vlcn.io/direct-connect-nodejs": "^0.4.0",
"@vlcn.io/direct-connect-common": "^0.5.0",
"@vlcn.io/direct-connect-nodejs": "^0.5.0",
"cors": "^2.8.5",
"express": "^4.18.2",
"pino-http": "^8.3.3",
Expand Down
100 changes: 50 additions & 50 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4e589e1

Please sign in to comment.