<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="198038" data-post-id="198038">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="hive" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  hive
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I came across this post:</p><aside class="quote quote-modified" data-post="1" data-topic="5166">
  <div class="title">
    <div class="quote-controls"></div>
    <img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/85e7bf/48.png" class="avatar">
    <div class="quote-title__text-content">
      <a href="https://forum.elixirforum.com/t/working-example-and-tutorial-phoenix-docker-edeliver-distillery/5166" rel="nofollow">Working Example and Tutorial: Phoenix + docker + edeliver + distillery</a> <a class="badge-category__wrapper " href="/c/questions-help/questions/53" rel="nofollow"><span data-category-id="53" style="--category-badge-color: #C14BFB; --category-badge-text-color: #000000; --parent-category-badge-color: #C14BFB;" data-parent-category-id="171" data-drop-close="true" class="badge-category --style-square --has-parent" title="Elixir Questions / Help"><span class="badge-category__name">Questions</span></span></a>
    </div>
  </div>
  <blockquote>
    I’ve created a complete working example and simple tutorial that should help anyone trying to develop a Phoenix app using a Mac, and deploy to some flavor of Linux. 
This approach uses docker + edeliver + distillery to build and deploy Phoenix releases and updates. 
The code and step-by-step tutorial is available on <a href="https://github.com/appdojolabs/myapp" rel="noopener nofollow ugc">github</a>. 
This explains how to develop  on a Mac, create releases for Ubuntu 16.04 (or any other flavor) using docker, and to deploy to Ubuntu with edeliver. 
I hope this helps other …
  </blockquote>
</aside>

<p>Is anyone using this?  Does it still work?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="198038" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/what-are-current-recommendations-for-the-best-way-to-deploy-phoenix-elixir-apps/36191/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-198038" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="198038"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="198054" data-post-id="198054">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="andrewf" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  andrewf
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Speaking of systemd services, here’s my systemd unit file:</p>
<pre><code class="lang-plaintext">[Unit]
Description=Erlang release startup

[Service]
Type=simple
User=webserver
Group=webserver

ExecStart=/opt/webserver/web/bin/web start
ExecStop=/opt/webserver/web/bin/web stop

# read environment variables from this file, including secrets
EnvironmentFile=/opt/webserver/web_env

# shouldn't matter. whatever
WorkingDirectory=/opt/webserver

[Install]
WantedBy=multi-user.target
</code></pre>
<p>Just dump in <code>/etc/systemd/system/webserver.service</code> (after adjusting paths, of course). IIRC this was mostly copy-pasta from somewhere else, so I can’t take credit for anything but the EnvironmentFile line.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="198054" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/what-are-current-recommendations-for-the-best-way-to-deploy-phoenix-elixir-apps/36191/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-198054" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="198054"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="198055" data-post-id="198055">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="ion" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ion/120/2611_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  ion
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Is anyone using libcluster for their Phoenix apps and can share tutorials?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="198055" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/what-are-current-recommendations-for-the-best-way-to-deploy-phoenix-elixir-apps/36191/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-198055" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="198055"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #13"></div>
  </section>
</div>
    <div class="postbit" id="198062" data-post-id="198062">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="hpjm" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  hpjm
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I use Distillery and Edeliver to help deploy on an Ubuntu VPS, it’s worked pretty well so far. This guide was really useful for me: <a href="https://medium.com/@zek/deploy-early-and-often-deploying-phoenix-with-edeliver-and-distillery-part-one-5e91cac8d4bd" rel="noopener nofollow ugc">https://medium.com/@zek/deploy-early-and-often-deploying-phoenix-with-edeliver-and-distillery-part-one-5e91cac8d4bd</a>.</p>
<p>This guide (<a href="https://dreamconception.com/tech/phoenix-automated-build-and-deploy-made-simple/" rel="noopener nofollow ugc">https://dreamconception.com/tech/phoenix-automated-build-and-deploy-made-simple/</a>) has a more involved setup but is probably more robust as it uses Ansible and handles other aspects of managing deployments.</p>
<p>There are more managed services, like Heroku or Gigalixir worth exploring.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="198062" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/what-are-current-recommendations-for-the-best-way-to-deploy-phoenix-elixir-apps/36191/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-198062" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="198062"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #14"></div>
  </section>
</div>
    <div class="postbit" id="198351" data-post-id="198351">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="bjunc" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/bjunc/120/16781_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  bjunc
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I am using libcluster in GCP Kubernetes. I don’t recall any specific tutorials, but I know there are a few that cover it. If you hit a dead-end, let me know and I can share how I do it.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="198351" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/what-are-current-recommendations-for-the-best-way-to-deploy-phoenix-elixir-apps/36191/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-198351" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="198351"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #15"></div>
  </section>
</div>
    <div class="postbit" id="198352" data-post-id="198352">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="bjunc" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/bjunc/120/16781_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  bjunc
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I have two deployment strategies:</p>
<ol>
<li>
<p>Quick-and-Dirty<br>
Deploy to Heroku. Many downsides, but the upside is how fast / simple it is. You can always use ngrok for something <em>really</em> quick and dirty, but Heroku is pretty convenient.</p>
</li>
<li>
<p>For everything else…<br>
I deploy to GCP Kubernetes. A much more powerful setup, with each Elixir container connected on a private network via libcluster k8s DNS. Kubernetes and Elixir go VERY well together. In some respects, k8s container orchestration feels familiar to how the BEAM / actor model works, but higher-level. I have two apps currently in production on this setup, both with essentially zero downtime due to rolling updates (no need for hot updates). Receiving a SIGTERM from Kubernetes can be caught in Elixir, giving you the ability to gracefully kill off processes in the reverse order they were created. This gives you time to stash things in cache, wait for any HTTP responses, and hand off processes to other container.</p>
</li>
</ol>
<p>For what it’s worth, I don’t think I have come across a deployment / devops solution that checks as many boxes as Google hosted Kubernetes.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="198352" data-batch-url="/posts/batch_likers">
                        4
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/what-are-current-recommendations-for-the-best-way-to-deploy-phoenix-elixir-apps/36191/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-198352" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="198352"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>