Deploy a Phoenix application on Google Cloud Platform Compute Engine

Deploy a Phoenix application on Google Cloud Platform Compute Engine

In this article, I will help you to deploy an application built with the Phoenix framework on a virtual machine on the Google Cloud Platform cloud provider.

Introduction

In this article, I will help you to deploy an application built with the Phoenix framework on a virtual machine on the Google Cloud Platform cloud provider.

First, we will create a “hello world” Phoenix application then we will explain how to build a release and deploy it with the help of Docker for cross-compilation of the release and Google Cloud Storage to store and deploy the release artifacts.

The full project is available on GitHub here.

All the commands listed in this tutorial are available in the shell scripts in the GitHub repository ( “run.sh”, “build.sh” etc…)

Prerequisite

To follow this tutorial, you will need the following tools installed or configured:

  • Docker installed on your local machine
  • A Google Cloud Platform account with a project activated
  • Elixir and Phoenix installed

GCP preparation steps

You will need some preparation on GCP for this tutorial.

We are going to use two GCP services:

  • Cloud storage to store the Elixir release and startup-script
  • Compute engine to run the Phoenix application on a virtual machine

First create a bucket with this command:

gsutil mb -p my-gcp-project -c STANDARD -l europe-west1 -b on gs://ps_elixir_releases/

Then create a service account with the storage admin and logging writer permissions.

elixir phoenix-framework google-compute-engine google-cloud-platform cloud

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Overview of Google Cloud Essentials Quest

If you looking to learn about Google Cloud in depth or in general with or without any prior knowledge in cloud computing, then you should definitely check this quest out.

Multi-cloud Spending: 8 Tips To Lower Cost

Mismanagement of multi-cloud expense costs an arm and leg to business and its management has become a major pain point. Here we break down some crucial tips to take some of the management challenges off your plate and help you optimize your cloud spend.

Google Cloud Training | Google Cloud Platform Course | Google Cloud for Beginners

**Link: https://www.youtube.com/watch?v=gud65lqebrc** In this [**Google Cloud Training**](https://www.youtube.com/watch?v=gud65lqebrc "Google Cloud Training") live session, you will know everything about google cloud from basic to advance level...

Studying for the Google Cloud Associate Engineer Certification

How to study for (and pass) Google’s cloud certification exam. This article provides resources and suggestions to aide in your studying for the ACE exam.

Google Cloud Platform Hosting Services in USA | SISGAIN

We strive to provide every customer business with google cloud hosting web services and managed series that are entirely personalized around the commercial and development goals of the company in USA. Businesses that work with us will see a marked...