Time for update to 1.4.4!
-
Any issues I should know about before updating
-
@Jenkler Take a look at the docs on how your Nginx (if you are using Nginx) should be configured to handle the change to assets and plugins:
https://docs.nodebb.org/en/latest/scaling/#use-a-proxy-server-to-serve-static-assets
Specifically
location @nodebb { proxy_pass http://io_nodes; } location ~ ^/assets/(.*) { root /path/to/nodebb/; try_files /build/public/$1 /public/$1 @nodebb; } location /plugins/ { root /path/to/nodebb/build/public/; try_files $uri @nodebb; } location / { proxy_pass http://io_nodes; }
-
@rod Here is my configuration, what would be your approach here?
server { listen 443 ssl; ssl_certificate /server/nginx/ssl/nodebb.se.crt; ssl_certificate_key /server/nginx/ssl/nodebb.se.key; location / { proxy_http_version 1.1; proxy_set_header Connection "upgrade"; proxy_pass http://www-nodebb-se:4567; proxy_set_header Host $host; proxy_set_header Upgrade $http_upgrade; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr; } root /dev/null; server_name nodebb.se www.nodebb.se; if ($host != 'www.nodebb.se') { rewrite ^/(.*)$ https://www.nodebb.se/$1 permanent; } }
Will this not work in 1.4.4 ? It works fine for 1.4.3... This is more a tweek right so nodebb skipps static content
BTW, i like clean configuration
-
@Jenkler My understanding from what I have read is that the designers seem to want to remove serving the static content through the node.js engine. Just let node.js do the NodeBB work but let Nginx (or any web server) serve out the static elements of the forum.
Although your configuration works today for
v1.4.3
and possible would forv1.4.4
it seems that in a future version it may no longer. -
Yeah that sound smart but in my case the upstream io_nodes { is not necessary. only have one instance
I guess I can add 2 blocks
location ~ ^/assets/(.*) { root /path/to/nodebb/; try_files /build/public/$1 /public/$1 @nodebb; } location /plugins/ { root /path/to/nodebb/build/public/; try_files $uri @nodebb; }
to solve this? Right?
Crap did not see @nodebb;
-
Guess its best to follow this
server { listen 80; server_name community.nodebb.org; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_redirect off; # Socket.io Support proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; gzip on; gzip_min_length 1000; gzip_proxied off; gzip_types text/plain application/xml text/javascript application/javascript application/x-javascript text/css application/json; location @nodebb { proxy_pass http://io_nodes; } location ~ ^/assets/(.*) { root /path/to/nodebb/; try_files /build/public/$1 /public/$1 @nodebb; } location /plugins/ { root /path/to/nodebb/build/public/; try_files $uri @nodebb; } location / { proxy_pass http://io_nodes; } }
Thanks @rod , will try this out. Any issues with 1.4.4 so far?
-
Sound great
Time to upgrade then
-
@Jenkler Do you have a "dev" setup that you test in before? I put together a simple outline of how I clone my production environment to a dev/test environment to which I test my updates first. If you care you may find my post here:
https://community.nodebb.org/topic/8479/how-to-create-manage-a-nodebb-test-dev-environment
I have not updated my post in a while but it should still be accurate.
-
Thanks, I will take a look at it Need to keep busy
-
Here is what I did for my changes when I went up to 1.4.x
-
Yeah! Updated to 1.4.4 + static content thru nginx... Cheers mates
Works great! Time to relax and play some games
-
@rod said in Time for update to 1.4.4!:
My understanding from what I have read is that the designers seem to want to remove serving the static content through the node.js engine
Yes and no... if you are using nginx or another reverse proxy, you may as well have nginx handle it... but NodeBB will always be a usable fallback if you don't wish to configure it. It's a tad slower, but nothing to really worry about unless you want to squeeze every ounce of performance from the machine/code
-
For what its worth I upgraded nodebb to 1.4.4 without changing the nginx config to handle the static content. I will do it in the near future but I need to change my docker setup. So don't be afraid to migrate without changing your reverse proxy settings.
Standard recommendations about doing backups (and test restores) applies.
-
I am also running docker! Needed to mount both my nodejs and nginx volumes to the nginx container. It works good, as it should. Nginx for static feels good