mirror of
https://github.com/bec-project/bec_atlas.git
synced 2025-07-14 07:01:48 +02:00
fix: moved ws to api/v1/ws
This commit is contained in:
@ -279,7 +279,7 @@ class RedisWebsocket:
|
||||
redis_options={"username": "ingestor", "password": redis_password},
|
||||
),
|
||||
)
|
||||
self.app = socketio.ASGIApp(self.socket)
|
||||
self.app = socketio.ASGIApp(self.socket, socketio_path=f"{prefix}/ws")
|
||||
self.loop = asyncio.get_event_loop()
|
||||
self.users = {}
|
||||
|
||||
|
@ -14,8 +14,8 @@ events {
|
||||
|
||||
|
||||
http {
|
||||
# include mime.types;
|
||||
default_type application/octet-stream;
|
||||
#include mime.types;
|
||||
#default_type application/octet-stream;
|
||||
|
||||
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
# '$status $body_bytes_sent "$http_referer" '
|
||||
@ -38,14 +38,22 @@ http {
|
||||
#gzip on;
|
||||
server {
|
||||
listen 80;
|
||||
server_name yourdomain.com; # Replace with your domain or IP
|
||||
listen [::]:80 default_server;
|
||||
|
||||
server_name bec-atlas.psi.ch; # Replace with your domain or IP
|
||||
root /var/nginx/bec-atlas-build/browser;
|
||||
index index.html index.htm;
|
||||
# Configure SSL if needed
|
||||
# listen 443 ssl;
|
||||
# ssl_certificate /path/to/cert.pem;
|
||||
# ssl_certificate_key /path/to/key.pem;
|
||||
|
||||
# serve the angular frontend
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location /api {
|
||||
proxy_pass http://fastapi_backend;
|
||||
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
@ -58,57 +66,12 @@ http {
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
|
||||
location /nginx_status {
|
||||
stub_status on;
|
||||
access_log off;
|
||||
allow 127.0.0.1; # Allow localhost
|
||||
deny all; # Deny all others
|
||||
}
|
||||
|
||||
# Optional: Serve static files
|
||||
location /static/ {
|
||||
root /path/to/static/files; # Adjust the path
|
||||
}
|
||||
|
||||
# Optional: Add caching for static files
|
||||
location ~* \.(jpg|jpeg|png|gif|css|js|ico|svg|woff|woff2|ttf|otf|eot|ttf|otf|html)$ {
|
||||
expires 30d;
|
||||
access_log off;
|
||||
}
|
||||
}
|
||||
# another virtual host using mix of IP-, name-, and port-based configuration
|
||||
#
|
||||
#server {
|
||||
# listen 8000;
|
||||
# listen somename:8080;
|
||||
# server_name somename alias another.alias;
|
||||
|
||||
# location / {
|
||||
# root html;
|
||||
# index index.html index.htm;
|
||||
# }
|
||||
#}
|
||||
|
||||
|
||||
# HTTPS server
|
||||
#
|
||||
#server {
|
||||
# listen 443 ssl;
|
||||
# server_name localhost;
|
||||
|
||||
# ssl_certificate cert.pem;
|
||||
# ssl_certificate_key cert.key;
|
||||
|
||||
# ssl_session_cache shared:SSL:1m;
|
||||
# ssl_session_timeout 5m;
|
||||
|
||||
# ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
# ssl_prefer_server_ciphers on;
|
||||
|
||||
# location / {
|
||||
# root html;
|
||||
# index index.html index.htm;
|
||||
# }
|
||||
#}
|
||||
include servers/*;
|
||||
}
|
||||
|
Reference in New Issue
Block a user