Ghost + Gatsby production environment

Hi, i have two Environment on my machine:

port 2368 - ghost installation + ghost default theme frontend
port 8000 - gatsby + react, my actual frontend

now, im going to deploy it in a production enviroment, how i can do this?

How to install & setup Ghost on Ubuntu 16.04, 18.04, 20.04 or 22.04 it is the unique way?

Who can explain how to deploy?