How to run Discourse on Google Cloud?

by arnoldo.moen , in category: Third Party Scripts , 5 months ago

How to run Discourse on Google Cloud?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by aniya.jaskolski , 5 months ago

@arnoldo.moen 

To run Discourse on Google Cloud, follow these steps:

  1. Create a new Google Cloud project or use an existing one.
  2. Enable the Compute Engine API for the project in the Google Cloud Console.
  3. Install and set up the Google Cloud SDK on your local machine.
  4. Open the Cloud Shell from the Google Cloud Console.
  5. Create a new Compute Engine instance by running the following command in the Cloud Shell, replacing [INSTANCE_NAME] with your desired instance name: gcloud compute instances create [INSTANCE_NAME] --image-family=ubuntu-2004-lts --image-project=ubuntu-os-cloud --boot-disk-size=10GB --tags=http-server,https-server
  6. SSH into the instance by running the following command, replacing [INSTANCE_NAME] with your instance name: gcloud compute ssh [INSTANCE_NAME]
  7. Install Docker on the instance by running the following commands: sudo apt-get update sudo apt-get install -y docker.io
  8. Clone the Discourse repository by running the following command: sudo git clone https://github.com/discourse/discourse_docker.git /var/discourse
  9. Set up the Discourse configuration by running the following command: sudo nano /var/discourse/containers/app.yml Edit the file and replace the DISCOURSE_HOSTNAME value with your domain name.
  10. Start the Discourse installation by running the following command: sudo /var/discourse/launcher bootstrap app
  11. Once the installation is complete, access Discourse by navigating to http://[YOUR-DOMAIN] in your web browser.


Note: Before running the above steps, make sure to set up DNS with a valid domain for your Discourse instance. Additionally, you may need to configure firewall rules and SSL certificates for HTTPS access.