0
votes

Does anyone know if it's possible to use Elixir on Google Cloud Platform? Specifically I'd like to know how to deploy an app to App Engine, and how to access the Cloud Storage API.

2

2 Answers

2
votes

No custom runtime required any more. Elixir is supported natively on Google Cloud Platform: https://cloud.google.com/elixir/

Quickstart dock: https://cloud.google.com/community/tutorials/elixir-phoenix-on-google-app-engine/

Check this community-tutorial on how to

  • Create an OTP release for your app using Distillery
  • Wrap your app release in a Docker image
  • Deploy your app on Google Kubernetes Engine

Phoenix/Elixir on Google Cloud

Accessing the Cloud Storage API is preferably done via JSON nowadays. Without more information I provide more customized information; see the Google Cloud Storage JSON API for more info.

1
votes

Use a custom runtime in the App Engine flexible environment to use an alternative implementation of Java, Python, Node.js, or Go, or write code in any other language.

Source: https://cloud.google.com/appengine/docs/flexible/custom-runtimes/

  1. Config application for Google App Engine. See https://cloud.google.com/appengine/docs/flexible/custom-runtimes/

  2. Use Dockerfile for Elixir (https://elixir-lang.org/), pick one of these: https://hub.docker.com/search/?isAutomated=0&isOfficial=0&page=1&pullCount=0&q=elixir&starCount=0

  3. Deploy Dockerfile to Google App engine.

  4. Use Google Cloud Storage JSON API to interactive with Google Cloud storage service by Elixir code via JSON: https://cloud.google.com/storage/docs/json_api/