Closed Gocnak closed 2 months ago
The backend Docker image we create https://github.com/momentum-mod/website/blob/main/Dockerfile should be run as the backend user created in the image. The node image also has the node user if we wanna just use that as well.
backend
node
To do so, all we need is to add USER node or USER backend right before the CMD on the last line, like so:
USER node
USER backend
CMD
USER backend CMD [ "node", "main.js" ]
The backend Docker image we create https://github.com/momentum-mod/website/blob/main/Dockerfile should be run as the
backend
user created in the image. Thenode
image also has thenode
user if we wanna just use that as well.To do so, all we need is to add
USER node
orUSER backend
right before theCMD
on the last line, like so: