<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>phoenix Archives | Clever Cloud</title>
	<atom:link href="https://www.clever.cloud/blog/tag/phoenix/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.clever.cloud/blog/tag/phoenix/</link>
	<description>From Code to Product</description>
	<lastBuildDate>Tue, 09 Jun 2020 10:40:00 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://cdn.clever-cloud.com/uploads/2023/03/cropped-cropped-favicon-32x32.png</url>
	<title>phoenix Archives | Clever Cloud</title>
	<link>https://www.clever.cloud/blog/tag/phoenix/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Deploy your Elixir/Phoenix Application to Production</title>
		<link>https://www.clever.cloud/blog/engineering/2020/06/09/deploy-elixir-phoenix/</link>
		
		<dc:creator><![CDATA[Valeriane Venance]]></dc:creator>
		<pubDate>Tue, 09 Jun 2020 10:40:00 +0000</pubDate>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[elixir]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[phoenix]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2020/06/09/deploy-elixir-phoenix/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/phoenix-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="phoenix 1" decoding="async" fetchpriority="high" srcset="https://cdn.clever-cloud.com/uploads/2021/08/phoenix-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/phoenix-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/phoenix-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/phoenix-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/phoenix-1-1368x528.png 1368w" sizes="(max-width: 1400px) 100vw, 1400px" /></p>Hi everyone! Today let's follow a simple deployment tutorial to learn how to deploy your Elixir/Phoenix Application.

<span id="more-2828"></span>
<h2 id="step-1-creating-a-new-phoenix-application">Step 1: Creating a new Phoenix Application</h2>
If you follow this tutorial, I assume you already have Elixir and Phoenix's dependencies installed locally. If you don't, you will probably want to read <a href="https://hexdocs.pm/phoenix/installation.html">this tutorial</a>.

To create a brand-new Phoenix application locally, we just need to type in our terminal:
<pre><code class="language-bash">$ mix phx.new &lt;your application's name&gt; # creating the new phoenix project
$ cd &lt;your application's name&gt;
$ mix ecto.create # creating database locally
</code></pre>
Creating the database locally isn't crucial for this tutorial, but it can help if you want to code on your machine.
<h3 id="note-to-osx-users">Note to OSX users</h3>
If you use OSX like me, you may encounter this error: <code>(Postgrex.Error) FATAL 28000 (invalid_authorization_specification) role "postgres" does not exist</code>. This is because when installing PostgreSQL with brew, it creates a user with your short name, not <code>postgres</code>. To fix this, open the project with your favorite text editor and replace <code>username: "postgres",</code> by <code>username: "&lt;your name&gt;",</code> in the file <code>config/dev.exs</code>. For instance, my name is <code>valeriane venance</code> in my computer so I replace with <code>username: "valeriane",</code>.
<h2 id="step-2-getting-our-application-ready-for-production">Step 2: Getting your Application Ready for Production</h2>
From the code perspective, all we need to do is to edit <code>config/prod.secret.exs</code> to replace <code>System.get_env("DATABASE_URL")</code> with <code>System.get_env("POSTGRESQL_ADDON_URI")</code>. This is because we will use the PostgreSQL add-on environment variable provided by Clever Cloud to your application instead of the default value.

Back in our terminal, we will generate a secret token that we will save for later with <code>$ mix phx.gen.secret</code> and check our elixir version with <code>$ elixir -v</code>.

And that's it. Easy right? Now let's go into our <a href="https://console.clever-cloud.com" target="_blank" rel="noopener">Clever Cloud console</a>.
<h2 id="step-3-creating-the-prod-application-and-database">Step 3: Creating the Prod Application and Database</h2>
If you already are a Clever Cloud user, these steps must be really familiar to you:
<ul>
 	<li>Under the organization of your choice, click new, then application. Select <strong>Elixir</strong>, then name your application and choose its deployment zone.</li>
 	<li>When prompted if you need an add-on, select <strong>PostgreSQL</strong>. Select your database size and name it.</li>
 	<li>On the environment variable screen create two new ones:</li>
 	<li><strong>SECRET_KEY_BASE</strong> with the value obtained from <code>$ mix phx.gen.secret</code> previously</li>
 	<li><strong>CC_ELIXIR_VERSION</strong> with the value of <code>$ elixir -v</code> result. (Available values as of today are <code>1.8</code>, <code>1.9</code> or <code>1.10</code>)</li>
 	<li>Click on <strong>update changes</strong></li>
 	<li>Bonus: if you have migrations to run you could also set the environment variable <strong>CC_PHOENIX_RUN_ECTO_MIGRATE</strong> to <code>true</code> to trigger the command <code>$ mix ecto.migrate</code></li>
</ul>
<h2 id="step-4-deploy">Step 4: deploy!</h2>
Once the previous steps are made, Clever Cloud will provide you a git remote and the commands to add the remote and to push your code. If you had not done it before, initialize a new git repository in your terminal with <code>git init</code>. Then add and commit your code. Now you should be able to copy and paste the provided git commands. If you go back to your Clever Cloud console, you will see that your deployment has started and logs should show up. Wait a few moments and your application will be up and running. You can visit it by clicking the link icon on top of your application's menu in the Clever Cloud console.
<h2 id="the-magic-explained">The magic explained</h2>
As Phoenix is a framework that was built to be as easy to use as RubyOnRails but less <em>magical</em>, let's demystify what just happened here.

When we push our code to the remote Clever Cloud provided, the following commands are run:
<pre><code class="language-bash">$ mix deps.get
$ mix deps.compile
$ npm install
</code></pre>
These commands will compile your dependencies at the root of your project folder. If you want to use another folder for <code>npm install</code>, specify it via the environment variable <strong>CC_PHOENIX_ASSETS_DIR</strong>. To change the folder for the entire build/run process, you should use the <strong>APP_FOLDER</strong> environment variable.

Then <code>$ mix compile</code> is run. If you want to override this behavior, you can set the environment variable <strong>CC_MIX_BUILD_GOAL</strong> to the value you desire.

At this point, there is the command <code>$ npm run deploy</code>.

Then <code>$ mix phx.digest</code> is run. You can override this one with the variable <strong>CC_PHOENIX_DIGEST_GOAL</strong>.

Finally, <code>$ mix phx.server</code> is invoked, and as always, you can override this behavior, either with <strong>CC_RUN_COMMAND</strong> where you have to specify the full command, or <strong>CC_PHOENIX_SERVER_GOAL</strong> where it will be a mix task by default.

If you need to specify the time zone of your application, you can do it with the variable <strong>TZ</strong> set to the usual time zone format, for instance <code>Europe/Paris</code>.

And that's it really, now you know how to deploy your Elixir/Phoenix Application. All you have to do left is write code, commit and push it again! Happy hacking!]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/phoenix-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="phoenix 1" decoding="async" srcset="https://cdn.clever-cloud.com/uploads/2021/08/phoenix-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/phoenix-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/phoenix-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/phoenix-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/phoenix-1-1368x528.png 1368w" sizes="(max-width: 1400px) 100vw, 1400px" /></p>Hi everyone! Today let's follow a simple deployment tutorial to learn how to deploy your Elixir/Phoenix Application.

<span id="more-2828"></span>
<h2 id="step-1-creating-a-new-phoenix-application">Step 1: Creating a new Phoenix Application</h2>
If you follow this tutorial, I assume you already have Elixir and Phoenix's dependencies installed locally. If you don't, you will probably want to read <a href="https://hexdocs.pm/phoenix/installation.html">this tutorial</a>.

To create a brand-new Phoenix application locally, we just need to type in our terminal:
<pre><code class="language-bash">$ mix phx.new &lt;your application's name&gt; # creating the new phoenix project
$ cd &lt;your application's name&gt;
$ mix ecto.create # creating database locally
</code></pre>
Creating the database locally isn't crucial for this tutorial, but it can help if you want to code on your machine.
<h3 id="note-to-osx-users">Note to OSX users</h3>
If you use OSX like me, you may encounter this error: <code>(Postgrex.Error) FATAL 28000 (invalid_authorization_specification) role "postgres" does not exist</code>. This is because when installing PostgreSQL with brew, it creates a user with your short name, not <code>postgres</code>. To fix this, open the project with your favorite text editor and replace <code>username: "postgres",</code> by <code>username: "&lt;your name&gt;",</code> in the file <code>config/dev.exs</code>. For instance, my name is <code>valeriane venance</code> in my computer so I replace with <code>username: "valeriane",</code>.
<h2 id="step-2-getting-our-application-ready-for-production">Step 2: Getting your Application Ready for Production</h2>
From the code perspective, all we need to do is to edit <code>config/prod.secret.exs</code> to replace <code>System.get_env("DATABASE_URL")</code> with <code>System.get_env("POSTGRESQL_ADDON_URI")</code>. This is because we will use the PostgreSQL add-on environment variable provided by Clever Cloud to your application instead of the default value.

Back in our terminal, we will generate a secret token that we will save for later with <code>$ mix phx.gen.secret</code> and check our elixir version with <code>$ elixir -v</code>.

And that's it. Easy right? Now let's go into our <a href="https://console.clever-cloud.com" target="_blank" rel="noopener">Clever Cloud console</a>.
<h2 id="step-3-creating-the-prod-application-and-database">Step 3: Creating the Prod Application and Database</h2>
If you already are a Clever Cloud user, these steps must be really familiar to you:
<ul>
 	<li>Under the organization of your choice, click new, then application. Select <strong>Elixir</strong>, then name your application and choose its deployment zone.</li>
 	<li>When prompted if you need an add-on, select <strong>PostgreSQL</strong>. Select your database size and name it.</li>
 	<li>On the environment variable screen create two new ones:</li>
 	<li><strong>SECRET_KEY_BASE</strong> with the value obtained from <code>$ mix phx.gen.secret</code> previously</li>
 	<li><strong>CC_ELIXIR_VERSION</strong> with the value of <code>$ elixir -v</code> result. (Available values as of today are <code>1.8</code>, <code>1.9</code> or <code>1.10</code>)</li>
 	<li>Click on <strong>update changes</strong></li>
 	<li>Bonus: if you have migrations to run you could also set the environment variable <strong>CC_PHOENIX_RUN_ECTO_MIGRATE</strong> to <code>true</code> to trigger the command <code>$ mix ecto.migrate</code></li>
</ul>
<h2 id="step-4-deploy">Step 4: deploy!</h2>
Once the previous steps are made, Clever Cloud will provide you a git remote and the commands to add the remote and to push your code. If you had not done it before, initialize a new git repository in your terminal with <code>git init</code>. Then add and commit your code. Now you should be able to copy and paste the provided git commands. If you go back to your Clever Cloud console, you will see that your deployment has started and logs should show up. Wait a few moments and your application will be up and running. You can visit it by clicking the link icon on top of your application's menu in the Clever Cloud console.
<h2 id="the-magic-explained">The magic explained</h2>
As Phoenix is a framework that was built to be as easy to use as RubyOnRails but less <em>magical</em>, let's demystify what just happened here.

When we push our code to the remote Clever Cloud provided, the following commands are run:
<pre><code class="language-bash">$ mix deps.get
$ mix deps.compile
$ npm install
</code></pre>
These commands will compile your dependencies at the root of your project folder. If you want to use another folder for <code>npm install</code>, specify it via the environment variable <strong>CC_PHOENIX_ASSETS_DIR</strong>. To change the folder for the entire build/run process, you should use the <strong>APP_FOLDER</strong> environment variable.

Then <code>$ mix compile</code> is run. If you want to override this behavior, you can set the environment variable <strong>CC_MIX_BUILD_GOAL</strong> to the value you desire.

At this point, there is the command <code>$ npm run deploy</code>.

Then <code>$ mix phx.digest</code> is run. You can override this one with the variable <strong>CC_PHOENIX_DIGEST_GOAL</strong>.

Finally, <code>$ mix phx.server</code> is invoked, and as always, you can override this behavior, either with <strong>CC_RUN_COMMAND</strong> where you have to specify the full command, or <strong>CC_PHOENIX_SERVER_GOAL</strong> where it will be a mix task by default.

If you need to specify the time zone of your application, you can do it with the variable <strong>TZ</strong> set to the usual time zone format, for instance <code>Europe/Paris</code>.

And that's it really, now you know how to deploy your Elixir/Phoenix Application. All you have to do left is write code, commit and push it again! Happy hacking!]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Elixir and Phoenix are now officially supported</title>
		<link>https://www.clever.cloud/blog/features/2019/12/05/elixir-phoenix/</link>
		
		<dc:creator><![CDATA[Laurent Doguin]]></dc:creator>
		<pubDate>Thu, 05 Dec 2019 16:44:00 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[elixir]]></category>
		<category><![CDATA[erlang]]></category>
		<category><![CDATA[phoenix]]></category>
		<category><![CDATA[release]]></category>
		<guid isPermaLink="false">https://www2.cleverapps.io/wp/blog/technology/2019/12/05/elixir-phoenix/</guid>

					<description><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/elixir-release-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="elixir release 1" decoding="async" srcset="https://cdn.clever-cloud.com/uploads/2021/08/elixir-release-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/elixir-release-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/elixir-release-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/elixir-release-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/elixir-release-1-1368x528.png 1368w" sizes="(max-width: 1400px) 100vw, 1400px" /></p><p>Today we officialize our support for Elixir and Phoenix!</p>
<span id="more-2968"></span>

<p>We have been testing this with some of our customers for quite a while now. So there it is, you can now deploy any <a href="https://elixir-lang.org/">Elixir</a> code, like a <a href="https://hexdocs.pm/phoenix">Phoenix</a> based website for instance. But first, if you are not familiar with both Elixir and Phoenix, let&#39;s see what it is.</p>
<p>Straight from Wikipedia:</p>
<blockquote>
Elixir is a functional, concurrent, general-purpose programming language that runs on the Erlang virtual machine. Elixir builds on top of Erlang and shares the same abstractions for building distributed, fault-tolerant applications. Elixir also provides productive tooling and extensible design.
</blockquote>

<p>Yes, it&#39;s using Erlang. The language and VM that powers, among others RabbitMQ, CouchDB, Facebook/Whatsapp messaging backend, and many Telcos backend. We are talking massive scale, concurrent usage here. To go back to elixir, here&#39;s what some simple code looks like:</p>
<pre><code class="language-ruby">defmodule KVTest do
  use ExUnit.Case

  def hello do
    :world
  end

  test &quot;greets the world&quot; do
    assert hello() == :world
  end
end
</code></pre>
<p>It feels like a functional Ruby.</p>
<p>Elixir applications use the <a href="https://elixir-lang.org/getting-started/mix-otp/introduction-to-mix.html">Mix</a> build tool as a task runner. With that, you can scaffold projects and code, compile, test, run, manage dependencies, run database migrations, and more. Everything runs on top of OTP (Open Telecom Platform), a set of Erlang libraries and tools. And inside OTP you will find BEAM, the virtual machine that compiles Erlang and Elixir source code into bytecode and run it. So this is what you have access to when you run and Elixir application on Clever Cloud.</p>
<p>The most wide-used Elixir Framework is Phoenix. It feels like Ruby on Rails. And this is what we&#39;ll see how to deploy today. If you want to follow, make sure you have installed clever-tools and Mix</p>
<pre><code class="language-bash">mix phx.new hello # generate a project, say Yes to Fetch and install dependencies.
clever addon create postgresql-addon hello-phoenix-pg # create a postgres database
clever create --type elixir hello-phoenix # create an erlang application on Clever Cloud
clever service link-addon hello-phoenix-pg # link the database
clever env set CC_PHOENIX_ASSETS_DIR assets # Tell Clever Cloud where to run the js build
</code></pre>
<p>This will generate all the code you need to start a Phoenix application. Just like Rails, there are other tasks you can use to generate code. Take a look at the list of <a href="https://hexdocs.pm/phoenix/phoenix_mix_tasks.html#phoenix-specific-mix-tasks">available tasks</a>.</p>
<p>Next, we should configure the database access. By default the DATABASE_URL variable is defined in <code>./config/prod.secret.exs</code>. In this file you will define all the secrets, which is to say anything that should not be hardcoded in your configuration files. The DATABASE_URL should be changed to POSTGRESQL_ADDON_URI, which is what will be available in your app. There are three other variables we can use in this file. The PORT is already configured, we just have do set a secret and a pool size limit:</p>
<pre><code class="language-bash">clever env set SECRET_KEY_BASE Th3S3Cr3t
clever env set POOL_SIZE 5
</code></pre>
<p>And now all there is to do is run these:</p>
<pre><code class="language-bash">git init # initialize a git repository
git add . # add all the files
git commit -m&quot;init&quot; first commit
clever deploy # push your code to Clever Cloud
clever open # open the site in your default browser
</code></pre>
<p>And you should see the Phoenix default app running :) As with most applications running on Clever Cloud, you can configure your build and deployment through environment variables. Here&#39;s the current list of options:</p>
<table class="table table-bordered" style="text-align:center">
  <tr>
    <th><center>Name</center></th>
    <th><center>Description</center></th>
    <th><center>Default value</center></th>
  </tr>
  <tr>
    <td>CC_ELIXIR_VERSION</td
    <td>Choose the Elixir version between '1.8' or `1.9`</td>
    <td>`1.9`</td>
    <td></td>
  </tr>
  <tr>
    <td>CC_PHOENIX_ASSETS_DIR</td
    <td>Folder in which your Phoenix assets are located.</td>
    <td></td>
  </tr>
  <tr>
    <td>CC_PHOENIX_DIGEST_GOAL</td>
    <td>Phoenix digest goal.</td>
    <td>phx.digest</td>
  </tr>
  <tr>
    <td>CC_PHOENIX_SERVER_GOAL</td>
    <td>Phoenix server goal.</td>
    <td>phx.server</td>
  </tr>
  <tr>
    <td>CC_PHOENIX_RUN_ECTO_MIGRATE</td>
    <td>Whether to run 'mix ecto.migrate' or not.</td>
    <td>true</td>
  </tr>
</table>

<p>Now you know all the basics to start an Elixir or Phoenix project. Have a look at some other Elixir frameworks like the Bot Framework <a href="https://github.com/hedwig-im/hedwig">Hedwig</a> or the simpler web one like <a href="https://github.com/CrowdHailer/raxx/">Raxx</a>, <a href="https://github.com/hexedpackets/trot">trot</a> or <a href="https://github.com/elixir-maru/maru">Maru</a>. Please let us know what you think about this :) Happy hacking!</p>
]]></description>
										<content:encoded><![CDATA[<p><img width="1400" height="540" src="https://cdn.clever-cloud.com/uploads/2021/08/elixir-release-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="elixir release 1" decoding="async" loading="lazy" srcset="https://cdn.clever-cloud.com/uploads/2021/08/elixir-release-1.png 1400w, https://cdn.clever-cloud.com/uploads/2021/08/elixir-release-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2021/08/elixir-release-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2021/08/elixir-release-1-768x296.png 768w, https://cdn.clever-cloud.com/uploads/2021/08/elixir-release-1-1368x528.png 1368w" sizes="auto, (max-width: 1400px) 100vw, 1400px" /></p><p>Today we officialize our support for Elixir and Phoenix!</p>
<span id="more-2968"></span>

<p>We have been testing this with some of our customers for quite a while now. So there it is, you can now deploy any <a href="https://elixir-lang.org/">Elixir</a> code, like a <a href="https://hexdocs.pm/phoenix">Phoenix</a> based website for instance. But first, if you are not familiar with both Elixir and Phoenix, let&#39;s see what it is.</p>
<p>Straight from Wikipedia:</p>
<blockquote>
Elixir is a functional, concurrent, general-purpose programming language that runs on the Erlang virtual machine. Elixir builds on top of Erlang and shares the same abstractions for building distributed, fault-tolerant applications. Elixir also provides productive tooling and extensible design.
</blockquote>

<p>Yes, it&#39;s using Erlang. The language and VM that powers, among others RabbitMQ, CouchDB, Facebook/Whatsapp messaging backend, and many Telcos backend. We are talking massive scale, concurrent usage here. To go back to elixir, here&#39;s what some simple code looks like:</p>
<pre><code class="language-ruby">defmodule KVTest do
  use ExUnit.Case

  def hello do
    :world
  end

  test &quot;greets the world&quot; do
    assert hello() == :world
  end
end
</code></pre>
<p>It feels like a functional Ruby.</p>
<p>Elixir applications use the <a href="https://elixir-lang.org/getting-started/mix-otp/introduction-to-mix.html">Mix</a> build tool as a task runner. With that, you can scaffold projects and code, compile, test, run, manage dependencies, run database migrations, and more. Everything runs on top of OTP (Open Telecom Platform), a set of Erlang libraries and tools. And inside OTP you will find BEAM, the virtual machine that compiles Erlang and Elixir source code into bytecode and run it. So this is what you have access to when you run and Elixir application on Clever Cloud.</p>
<p>The most wide-used Elixir Framework is Phoenix. It feels like Ruby on Rails. And this is what we&#39;ll see how to deploy today. If you want to follow, make sure you have installed clever-tools and Mix</p>
<pre><code class="language-bash">mix phx.new hello # generate a project, say Yes to Fetch and install dependencies.
clever addon create postgresql-addon hello-phoenix-pg # create a postgres database
clever create --type elixir hello-phoenix # create an erlang application on Clever Cloud
clever service link-addon hello-phoenix-pg # link the database
clever env set CC_PHOENIX_ASSETS_DIR assets # Tell Clever Cloud where to run the js build
</code></pre>
<p>This will generate all the code you need to start a Phoenix application. Just like Rails, there are other tasks you can use to generate code. Take a look at the list of <a href="https://hexdocs.pm/phoenix/phoenix_mix_tasks.html#phoenix-specific-mix-tasks">available tasks</a>.</p>
<p>Next, we should configure the database access. By default the DATABASE_URL variable is defined in <code>./config/prod.secret.exs</code>. In this file you will define all the secrets, which is to say anything that should not be hardcoded in your configuration files. The DATABASE_URL should be changed to POSTGRESQL_ADDON_URI, which is what will be available in your app. There are three other variables we can use in this file. The PORT is already configured, we just have do set a secret and a pool size limit:</p>
<pre><code class="language-bash">clever env set SECRET_KEY_BASE Th3S3Cr3t
clever env set POOL_SIZE 5
</code></pre>
<p>And now all there is to do is run these:</p>
<pre><code class="language-bash">git init # initialize a git repository
git add . # add all the files
git commit -m&quot;init&quot; first commit
clever deploy # push your code to Clever Cloud
clever open # open the site in your default browser
</code></pre>
<p>And you should see the Phoenix default app running :) As with most applications running on Clever Cloud, you can configure your build and deployment through environment variables. Here&#39;s the current list of options:</p>
<table class="table table-bordered" style="text-align:center">
  <tr>
    <th><center>Name</center></th>
    <th><center>Description</center></th>
    <th><center>Default value</center></th>
  </tr>
  <tr>
    <td>CC_ELIXIR_VERSION</td
    <td>Choose the Elixir version between '1.8' or `1.9`</td>
    <td>`1.9`</td>
    <td></td>
  </tr>
  <tr>
    <td>CC_PHOENIX_ASSETS_DIR</td
    <td>Folder in which your Phoenix assets are located.</td>
    <td></td>
  </tr>
  <tr>
    <td>CC_PHOENIX_DIGEST_GOAL</td>
    <td>Phoenix digest goal.</td>
    <td>phx.digest</td>
  </tr>
  <tr>
    <td>CC_PHOENIX_SERVER_GOAL</td>
    <td>Phoenix server goal.</td>
    <td>phx.server</td>
  </tr>
  <tr>
    <td>CC_PHOENIX_RUN_ECTO_MIGRATE</td>
    <td>Whether to run 'mix ecto.migrate' or not.</td>
    <td>true</td>
  </tr>
</table>

<p>Now you know all the basics to start an Elixir or Phoenix project. Have a look at some other Elixir frameworks like the Bot Framework <a href="https://github.com/hedwig-im/hedwig">Hedwig</a> or the simpler web one like <a href="https://github.com/CrowdHailer/raxx/">Raxx</a>, <a href="https://github.com/hexedpackets/trot">trot</a> or <a href="https://github.com/elixir-maru/maru">Maru</a>. Please let us know what you think about this :) Happy hacking!</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
