Phoenix Release on GCP

Hello all!

I’ve come from another languages like python, c#, php and make it run in a server its relative easy, but I’m having problem with phoenix…

First of all my servers are in Google Cloud Platform, this makes that solutions like edeliver dont work for me (I did achieve it to work, I’m pretty sure its because the high level security for ssh connection in GCP [good for security painful for development])

I already test with this tutorial

https://blog.polyscribe.io/a-complete-guide-to-deploying-elixir-phoenix-applications-on-kubernetes-part-1-setting-up-d88b35b64dcd

It works fine except for the DB that never connects (I don’t have experience with Docker and kubernetes) and I dont need many nodes with load balancing etc… This is pretty small project that I’m working right now, its enought with a instance running postgres and phoenix.

So my goal as mention before is to run Phoenix with postgre in a GCP instance.

If someone has experience with this can give me a hand to make this release I’ll be very greatful!

Greetings!

I have solve it (I dont know if its the correct way but it works for me) (I dont use any brunch or html so may be differ in a app with this features)

Create and ubuntu instance -> Install and setup postgre:

(cool guide) https://cloud.google.com/community/tutorials/setting-up-postgres

-> Install erlang etc on the machine:

wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && \
  dpkg -i erlang-solutions_1.0_all.deb && \
  apt-get update && \
  apt-get install -y esl-erlang elixir build-essential openssh-server git locales

-> Clone you project in the instance (already configured the production data and with distillery dep added) -> mix deps.get, compile, release --env=prod

-> Run the command you want that gives distillery and thats all! (if you set in prod port 80 you need run this command as sudo)

Greetings!