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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote group-Phoenix-Core-Team" data-username="Gazler" data-post="9" data-topic="4100">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/gazler/48/1168_2.png" class="avatar"> Gazler:</div>
<blockquote>
<p>I’m not sure why you would want to do it in development. If there is some reason that they need to exist together then they may not be good candidates for separating into different apps.</p>
</blockquote>
</aside>
<p>Thanks <a class="mention" href="/u/gazler" rel="nofollow">@Gazler</a> for your responses. I’m adding a +1 here because I’ve been trying to achieve the same result. My use case is that I want to build multiple apps, imagine a portfolio of sample projects or maybe micro-services, but as a developer I don’t want to create a new Digital Ocean droplet or AWS server or new Heroku app or dockerfile <strong>for each app</strong>. I want each App to almost be like a package in bigger App. Do you get what I mean? Do you have another way of achieving this? Most tutorials or application demos assume that they’re either monolithic or the only thing running on the server so they default to binding to port 80/443 etc. or default application entry point. Imagine a hosted app with ports in the domain name like <code>google.com/gmail:4567</code> most people just want to see <code>gmail.google.com</code> and the port routing is handled somewhere… bonus points to Alphabet because even <code>gmail.com</code> works too. <img src="https://forum.elixirforum.com/images/emoji/apple/smile.png?v=15" title=":smile:" class="emoji" alt=":smile:" loading="lazy" width="20" height="20"></p>
<p>Why can’t we have multiple apps running on the same server at different ports and being routed internally on the network or app layer through nginx or plug? I’ve tried a few different solutions but I can’t seem to have assets, websockets and APIs all working at the same time. Using plug and the host value to route requests still means that the assets aren’t delivered <a href="https://github.com/iampeterbanjo/hello-proxy/commit/a00b684ab6dd89e7eebb1f8ebed56834df540735" class="inline-onebox" rel="noopener nofollow ugc">add plug proxy for holaWeb.Endpoint · iampeterbanjo/hello-proxy@a00b684 · GitHub</a> and using Nginx means that the websocket requests don’t work <a href="https://github.com/iampeterbanjo/hello-proxy/blob/master/nginx/nginx.conf" class="inline-onebox" rel="noopener nofollow ugc">hello-proxy/nginx/nginx.conf at master · iampeterbanjo/hello-proxy · GitHub</a></p>
<p>With Elixir umbrella projects it seems that we are so close to making this work… so close <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="64697" 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/phoenix-1-3-umbrella-architecture/4100/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-64697" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="64697"
                     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="64699" data-post-id="64699">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I have an issue open for the Acme Bank demo app that seems to have some other devs interested in this use case<br>
<a href="https://github.com/wojtekmach/acme_bank/issues/14" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/wojtekmach/acme_bank/issues/14</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="64699" 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/phoenix-1-3-umbrella-architecture/4100/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-64699" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="64699"
                     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="64708" data-post-id="64708">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Gazler" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Gazler/120/1168_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Gazler
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Phoenix Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/iampeterbanjo" rel="nofollow">@iampeterbanjo</a> Pretty sure you need some additional settings for WebSockets and nignx (taken from <a href="https://www.nginx.com/blog/websocket-nginx/" class="inline-onebox" rel="noopener nofollow ugc">NGINX | F5</a>):</p>
<pre><code>proxy_pass http://127.0.0.1:4010;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
</code></pre>
<p>Nginx is the way I would go for hosting multiple applications on the same server.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="64708" data-batch-url="/posts/batch_likers">
                        3
                      </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/phoenix-1-3-umbrella-architecture/4100/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-64708" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="64708"
                     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="64712" data-post-id="64712">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thanks</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="64712" 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/phoenix-1-3-umbrella-architecture/4100/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-64712" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="64712"
                     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="64714" data-post-id="64714">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Nginx is the way to go, but if you’re stuck with managed hosting you have to stop using umbrella to manage multiple phoenix app (one for API, one for admin backend, etc).</p>
<p>I can’t find a managed hosting with postgresql and nginx.</p>
<p>Thanks for your answers.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="64714" 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/phoenix-1-3-umbrella-architecture/4100/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-64714" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="64714"
                     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="104959" data-post-id="104959">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I struggled with master_proxy but finally made it work on my Phoenix 1.4 / cowboy 2.5 app.</p>
<p>It supports HTTPS and websockets properly, here is a gist: <a href="https://gist.github.com/cblavier/0c2cf3f101d82c32503774f179a66a3f" class="inline-onebox" rel="noopener nofollow ugc">Cowboy 2.5 proxy, used to bind a single port (on Heroku) for umbrella Phoenix applications. It supports HTTPS and websockets properly. · GitHub</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="104959" 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/phoenix-1-3-umbrella-architecture/4100/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-104959" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="104959"
                     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 #16"></div>
  </section>
</div>
    <div class="postbit" id="104965" data-post-id="104965">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>This may not be specifically applicable to this thread but if anyone is looking for an alternative to nginx as a proxy, we have successfully set up Traefik as a proxy to a phoenix 1.4 app.</p>
<p>Traefik will manage letsencrypt renewals and can detect internal resource changes without a restart.</p>
<aside class="onebox githubgist" data-onebox-src="https://gist.github.com/mazz/001d4aee4aa748361feedea6939cf1a4">
  <header class="source">

      <a href="https://gist.github.com/mazz/001d4aee4aa748361feedea6939cf1a4" target="_blank" rel="noopener nofollow ugc">gist.github.com</a>
  </header>

  <article class="onebox-body">
    <h4><a href="https://gist.github.com/mazz/001d4aee4aa748361feedea6939cf1a4" target="_blank" rel="noopener nofollow ugc">https://gist.github.com/mazz/001d4aee4aa748361feedea6939cf1a4</a></h4>

  <h5>docker-compose.yml</h5>
  <pre><code class="YAML"># https://docs.docker.com/compose/compose-file/
version: '3.7'
services:
  app_name:
    build: .
    depends_on:
      - postgres
    environment:
      DATABASE_URL: ecto://app_name:app_name@postgres/app_name
      HOSTNAME: localhost</code></pre>
   This file has been truncated. <a href="https://gist.github.com/mazz/001d4aee4aa748361feedea6939cf1a4" target="_blank" rel="noopener nofollow ugc">show original</a>
  <h5>traefik-docker-compose.yml</h5>
  <pre><code class="YAML"># traefik docker compose file

version: '3'

services:
  reverse-proxy:
    image: traefik
    restart: always
    command: |
            --docker</code></pre>
   This file has been truncated. <a href="https://gist.github.com/mazz/001d4aee4aa748361feedea6939cf1a4" target="_blank" rel="noopener nofollow ugc">show original</a>


  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>
 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="104965" 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/phoenix-1-3-umbrella-architecture/4100/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-104965" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="104965"
                     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>