@clementneveu said in Upload File API - 403 Forbidden:
To get the csrf_token with the config api, no problem for me !
How are you getting this token? Can you show us the code?
Hello, I am quite a newbie, playing with nodebb.
I don't understand how to run node.js standalone in a way that can be considered stable, so I run the docker image. Now, because of my inexperience I don't trust docker volumes at all, so I redirect directories. What I do in case of updates is: I delete everything, pull new image, replace files. What I am doing:
/usr/src/app/config.json
/usr/src/app/public/uploads
then after pulling fresh image, replace them.
Because if I replace /usr/src/app
or /usr/src/app/public
I would have outdated program files, right?
What do you think?
@Gliding9426 said in What to backup? Just config and uploads?:
I don't understand how to run node.js standalone in a way that can be considered stable, so I run the docker image
Welcome to the NodeBB community! In fact, running "standalone" is much better supported (and easier) than the docker image you currently have. All that is required is the following (from a basic perspective)
The guide here will provide you with step by step instructions
https://docs.nodebb.org/installing/os/ubuntu/
You can always ask here too if you need some assistance.
I echo @phenomlab's sentiment, what exactly is giving you pause about a standalone installation? If it's the fact that you run the node app with node app.js
, you should consider using something like systemd
to take care of the running and restarting of your app... or if not, just use the built in NodeBB loader ./nodebb start
As for the main question; just two things:
public/uploads
Everything else you can blow away. It does not hurt to preserve config.json
too, but it can be easily reconstructed with ./nodebb setup
.
it's just, in general, i can move docker containers with ease on a new server, that's the biggest advantage for me, especially when things start to go outside the project directory (systemd conf files, the nginx conf files, and so on)
wait, if i type ./nodebb start
it takes care by itself to stay in memory and i don't need to rely on ugly hacks like screen
?
@Gliding9426 Yeah, NodeBB can fork itself and maintain its own state if you prefer not to use separate tooling.