Deploy Pollux¶
How to run Pollux in production.
Prerequisites¶
Make sure you have a data directory for the SQLite database:
As a background process¶
Use bun run with a process manager:
Or use screen / tmux to keep it running in the background.
With a process manager¶
Using pm2:
Using Docker¶
Build a Docker image:
Build and run:
Reverse proxy (nginx)¶
server {
listen 80;
server_name pollux.example.com;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
}
The Upgrade and Connection headers are required for WebSocket support.