Now that you have Ghost running the steps from here are very dependent on what you specifically want to do with the database.
I'll walk you through some common areas you might find yourself when you need to troubleshoot errors that are happening as you integrate and deploy Ghost in your applications.
Instructor: [0:00] We made it to the Ghost Setup Wizard. That means we've successfully installed Ghost on our server and it's connecting to our database. If we wanted to, we could go ahead and walk through the account creation process and get our Ghost site up and running.
[0:15] I'm going to let you do that since this is your Ghost instance, but I want to leave you with some resources on where to go next and some places that you might need to troubleshoot down the road. The two most common things that you're going to want to do in order to get this out into production is change the database information to be more secure and also change over to a custom domain.
[0:36] To do this, your best option is to use the Ghost CLI. The Ghost CLI will let you do all this kind of thing just by using commands. You can configure NGINX. You can update your database information. There's a whole reference here that you can use.
[0:51] There's a Ghost setup command that is what got run during the installation process. You can tap into that and run it anytime you want to do things like update the database information to a more secure password or update NGINX for setting up a custom domain. Always go to the Ghost-CLI docs first before you try to do anything because Ghost will almost certainly have something in the CLI that will make your life easier.
[1:17] Sometimes, you do need to get into the actual underlying file structure and tinker around with things. I do want to show you two things before we go. Let's hop back over to the terminal. The first thing that you're going to want to look at sometimes is the configuration file.
[1:33] If I do a list of this directory here, you can see we have this config.production.json. If I look in that config.production with Vim, we can see we have our URL. We also have all of our database information. You could just manually change this information here.
[1:52] You might not want to do that. You might want to use the Ghost-CLI to update that for you. If things are going wrong, you may need to tap into this file and mess around with some things. That's the first go-to spot for troubleshooting.
[2:06] The other one is the NGINX configuration. I want to show you that. If I cd over to /etc/nginx and list that out, you can see a number of different folders here. The one that we're concerned about is sites-enabled. Let's change directory into sites-enabled and list that out. You can see that we have a configuration file that matches our IP address.
[2:29] If I read that one out with Vim, you can see here that we've got our server name, which is our public IP address for our EC2 instance, and some configuration for Ghost here that's going to basically hand off port 2368 over to port 80.
[2:47] Again, Ghost should be able to modify this kind of thing for you but notice that we've got our IP address for our EC2 instance tied to all of our configuration for the rest of Ghost.
[2:57] If we were ever to stop our EC2 instance and reboot it, it might break our configuration here since we're depending on this hard-coded IP address. In order to take this to production, you're going to want to set up a custom domain and use the Ghost-CLI to configure everything accordingly.
[3:17] I just wanted to leave you with that because I didn't want you to get super frustrated as soon as your IP address changed. I didn't want you to get mad at this tutorial and think that everything was broken. It is possible to change this. You're going to use the CLI and these couple of files, and you'll be good to go.
[3:32] Thanks again for watching this course. I hope you learned a lot and had a great time.