I will be hosting an unknown number of applications.
Whenever a new application is added I would like to add it to the server dynamically to avoid stopping any on-going sessions (since panel holds state server side, I can’t just restart the server).
How do I add new apps to an already running server instance? I would like to avoid having to create isolated containers for each application, unless this is the only option.
BR
Thank you for the reply ahuang. I’m not exactly sure what you’re proposing. I’m currently not worried about the frontend state.
My question is about how I add additional panels/applications to an already running server
You could keep track of the app links via static HTML in sidebar, which doesn’t require a restart for changes to apply whenever you add stuff. Then, you can use nginx to route all the apps that live on different ports. And finally, you dynamically add new apps w/o having to restart the old ones.
Nginx config:
server {
listen 80;
location / {
proxy_pass http://localhost:5006;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host:$server_port;
proxy_buffering off;
}
location /app1 {
proxy_pass http://localhost:5006;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host:$server_port;
proxy_buffering off;
}
location /app2 {
proxy_pass http://localhost:5007;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host:$server_port;
proxy_buffering off;
}
}
Sidebar with links: