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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/marioflach" rel="nofollow">@MarioFlach</a></p>
<p>Is it your roadmap - to extract git server functionality in separate hex packages?</p>
<p>I’m trying to make a small project which will use git server approaches (it means that you can push something to it), but cloning the whole GitGud with significant changes in web part seems to be very bad idea, because it’s impossible to pull new updates with git-server part in the future.</p>
<p>I can help with contributing to git-server part with documentations, testing and use experience, if it will be separated.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="97532" 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/gitgud-github-clone-entirely-written-in-elixir/12920/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-97532" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="97532"
                     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 #21"></div>
  </section>
</div>
    <div class="postbit" id="97592" data-post-id="97592">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Any chance of putting up a demo site somewhere so we can see it without installing it locally?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="97592" 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/gitgud-github-clone-entirely-written-in-elixir/12920/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-97592" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="97592"
                     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 #22"></div>
  </section>
</div>
    <div class="postbit" id="97601" data-post-id="97601">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>2 things:</p>
<ol>
<li>This is really cool.</li>
<li>Hosting the source on Github is so meta</li>
</ol> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="97601" 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/gitgud-github-clone-entirely-written-in-elixir/12920/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-97601" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="97601"
                     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 #23"></div>
  </section>
</div>
    <div class="postbit" id="97640" data-post-id="97640">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="MarioFlach" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/MarioFlach/120/24564_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  MarioFlach
                    <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>It’s an umbrella application with three apps:</p>
<ul>
<li><code>:gitrekt</code> – Git NIFs, wire-protocol and packfile implementation.</li>
<li><code>:gitgud</code> – Ecto schemas and queries for users and repositories, authorization and Git HTTP and SSH transport protocol implementation.</li>
<li><code>:gitgud_web</code> – Web application and GraphQL.</li>
</ul>
<p>The dependency graph looks as follow:</p>
<p><code>gitrekt &lt;- gitgud &lt;- gitgud_web</code></p>
<p>Currently, I do not plan to split the project into multiple independent apps. At least not until I release a more stable version.</p>
<p>If you wish to do so, you can extract <code>:gitrekt</code> and  <code>:gitgud</code> and use them independently without Phoenix and Absinthe dependencies.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="97640" 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/gitgud-github-clone-entirely-written-in-elixir/12920/25">Post #24</a>
	                </div>
	            </div>
              <div id="likers-container-97640" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="97640"
                     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 #24"></div>
  </section>
</div>
    <div class="postbit" id="97643" data-post-id="97643">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="MarioFlach" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/MarioFlach/120/24564_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  MarioFlach
                    <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’m doing my best to release a more polished version soon. In the long-term, a public launch is planned and moving the project’s codebase to it own service will be the first logic step. Stay tuned =)</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="97643" 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/gitgud-github-clone-entirely-written-in-elixir/12920/26">Post #25</a>
	                </div>
	            </div>
              <div id="likers-container-97643" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="97643"
                     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 #25"></div>
  </section>
</div>
    <div class="postbit" id="97645" data-post-id="97645">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="MarioFlach" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/MarioFlach/120/24564_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  MarioFlach
                    <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">
								<ol>
<li>Thanks a lot =)</li>
<li>It is and feels <s>wrong</s> weird in many ways =)</li>
</ol> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="97645" 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/gitgud-github-clone-entirely-written-in-elixir/12920/27">Post #26</a>
	                </div>
	            </div>
              <div id="likers-container-97645" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="97645"
                     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 #26"></div>
  </section>
</div>
    <div class="postbit" id="136633" data-post-id="136633">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/marioflach" rel="nofollow">@MarioFlach</a> impressive !</p>
<p>I’ve got a question. When building Erlang/Elixir software in docker - private repositories (git ssh) are always a problem. The current options are:</p>
<ol>
<li>(Linux only, doesn’t work on Mac) - Dockerfile which mounts ssh-agent</li>
<li>Copy id_rsa into docker container</li>
<li>Fetch dependencies, then run the docker build - possible but ugly - and doesn’t work well with build caching (invalidates the cache).</li>
</ol>
<p>I’ve had an idea of a possible solution. A ssh git proxy running in the same docker network, with the hostname <a href="http://github.com" rel="noopener nofollow ugc">github.com</a></p>
<ol>
<li>You provide a machine user SSH key as credentials when starting the git proxy - the SSH key can read all required repositories, but not write.</li>
<li>Your build containers is also configured to use this network (lets call it ‘ci’)</li>
<li>Your build runs, it makes git ssh requests to download dependencies, but thanks to the magic of docker hostnames it’s actually talking to the proxy.</li>
<li>The proxy deleagates to github, pulls the repo, maybe caches it, and returns it to the build containers.</li>
<li>$profit$ - well actually no profit, it’s open-source</li>
</ol>
<p>I was wondering could some part of your project be reused to achieve this goal - it would really improve the CI story for Erlang/Elixir vs go (where all the dependencies are just ‘vendored’ (copy-n-pasted) into the repository.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">
   +-------------------------Network 'ci'-----------------------------+
   |                                                                  |
   |                                                                  |
   |   +----------------+    Fetch dependency  +------------------+   |
   |   |                |    (git ssh)         | Docker container |   |
   |   |  docker build  +----------------------&gt; (github.com)     |   |
   |   |                |                      |                  |   |
   |   +----------------+                      +------------------+   |
   |                                                     |            |
   |                                                     |            |
   +------------------------------------------------------------------+
                                                         |
                                                         |
                         +--------------------------+    |
                         |                          |    |
                         |     Github.com           +&lt;---+
                         |                          |  Fetch and cache
                         |                          |
                         |                          |
                         +--------------------------+



</code></pre>
<p>I’m thinking of tools like :</p>
<ol>
<li><a href="https://github.com/kurzdigital/git-cache-http-server-docker" class="inline-onebox" rel="noopener nofollow ugc">GitHub - kurzdigital/git-cache-http-server-docker: git-cache-http-server as a Docker container · GitHub</a></li>
<li><a href="https://github.com/bryanhuntesl/apt-cacher-ng" rel="noopener nofollow ugc">https://github.com/bryanhuntesl/apt-cacher-ng</a></li>
</ol>
<p>Thanks,</p>
<p>Bryan</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="136633" 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/gitgud-github-clone-entirely-written-in-elixir/12920/28">Post #27</a>
	                </div>
	            </div>
              <div id="likers-container-136633" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="136633"
                     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 #27"></div>
  </section>
</div>
    <div class="postbit" id="136684" data-post-id="136684">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Checkout docker 19.03 (not GA as of this comment but there are release candidates) for secure ways of doing the id_rsa “copy”. Note you can also use <code>.netrc</code> file to use <code>https</code> instead of <code>ssh</code> for cloning from github.</p>
<p>There is a good blog post about using it for ssh and secrets for netrc here <a href="https://medium.com/@tonistiigi/build-secrets-and-ssh-forwarding-in-docker-18-09-ae8161d066" rel="noopener nofollow ugc">https://medium.com/@tonistiigi/build-secrets-and-ssh-forwarding-in-docker-18-09-ae8161d066</a></p>
<p>You could also use it for hexpm:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">RUN --mount=type=secret,id=hex.config,target=/root/.config/rebar3/hex.config rebar3 compile
</code></pre>
<p>Then run with with:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">$ docker build --secret id=hex.config,src=~/.config/rebar3/hex.config .
</code></pre>
<p>There is also a new build cache that allows you to store artifacts like fetched hex deps separate from the image and automatically bring them in at build time. Plus mounting <code>.</code> instead of <code>COPY . .</code>.</p>
<p>I got it working but was hacky to do having rebar3’s <code>_build</code> be stored outside of <code>./</code> so it could be cached by the new docker build cache and then you don’t lose your built dependencies or git clones either. I’m sure similar can be done with <code>mix</code>.</p>
<hr>
<p>I have written all this up with more details and examples but I’m still waiting for 19.03 to be released before publishing <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="136684" 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/gitgud-github-clone-entirely-written-in-elixir/12920/29">Post #28</a>
	                </div>
	            </div>
              <div id="likers-container-136684" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="136684"
                     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 #28"></div>
  </section>
</div>
    <div class="postbit" id="136693" data-post-id="136693">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Very interesting an cool project <a class="mention" href="/u/marioflach" rel="nofollow">@MarioFlach</a> , it makes you think that sky is the limit with elixir and phoenix.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="136693" 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/gitgud-github-clone-entirely-written-in-elixir/12920/30">Post #29</a>
	                </div>
	            </div>
              <div id="likers-container-136693" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="136693"
                     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 #29"></div>
  </section>
</div>
    <div class="postbit" id="136711" data-post-id="136711">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thanks Tristan - I see in Docker for Mac edge release notes - <a href="https://docs.docker.com/docker-for-mac/edge-release-notes/" class="inline-onebox" rel="noopener nofollow ugc">Docker Desktop release notes | Docker Docs</a></p>
<pre data-code-wrap="elixir"><code class="lang-elixir">Upgrades
* [Docker 19.03.0-rc2](https://github.com/docker/docker-ce/releases/tag/v19.03.0-rc2)
</code></pre>
<p>Oh joy - have you managed to get the secrets stuff working on OSX? I reached out a couple of months ago and there was no progress.</p>
<p>B</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="136711" 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/gitgud-github-clone-entirely-written-in-elixir/12920/31">Post #30</a>
	                </div>
	            </div>
              <div id="likers-container-136711" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="136711"
                     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 #30"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/12920/load_more?page=4">Load more posts (33 remaining)</a>
</div></template></turbo-stream>