<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Chityanj</title>
    <description>The latest articles on Forem by Chityanj (@chityanj).</description>
    <link>https://forem.com/chityanj</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F254776%2Fae2f91b6-c0d0-42c3-85d9-73fcfc31b0b2.jpeg</url>
      <title>Forem: Chityanj</title>
      <link>https://forem.com/chityanj</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/chityanj"/>
    <language>en</language>
    <item>
      <title>Deploying h5ai on heroku and using git as a storage</title>
      <dc:creator>Chityanj</dc:creator>
      <pubDate>Sat, 22 Aug 2020 14:09:36 +0000</pubDate>
      <link>https://forem.com/chityanj/deploying-h5ai-on-heroku-and-using-git-as-a-storage-3ah8</link>
      <guid>https://forem.com/chityanj/deploying-h5ai-on-heroku-and-using-git-as-a-storage-3ah8</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww0.assets.heroku.com%2Fassets%2Fhome%2Fhero%2Fdata-a4eeceb4fc7926c678eb97c570037dc83f75a052f523f1c3014b1c0b1d505bf6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww0.assets.heroku.com%2Fassets%2Fhome%2Fhero%2Fdata-a4eeceb4fc7926c678eb97c570037dc83f75a052f523f1c3014b1c0b1d505bf6.png" alt="heroku"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://larsjung.de/h5ai/" rel="noopener noreferrer"&gt;h5ai!&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.sur.ly%2Fthumbnails%2F620x343%2Fa%2Farter97.com.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.sur.ly%2Fthumbnails%2F620x343%2Fa%2Farter97.com.png" alt="h5ai"&gt;&lt;/a&gt;&lt;br&gt;
h5ai is a modern file indexer for HTTP web servers with focus on your files. Directories are displayed in a appealing way and browsing them is enhanced by different views, a breadcrumb and a tree overview. Initially h5ai was an acronym for HTML5 Apache Index but now it supports other web servers too.&lt;/p&gt;
&lt;h2&gt;
  
  
  Deploying h5ai
&lt;/h2&gt;

&lt;p&gt;Fork &lt;a href="https://github.com/Chityanj/h5ai-on-heroku-using-git-as-storage" rel="noopener noreferrer"&gt;h5ai on heroku using git as a storage!&lt;/a&gt; &lt;br&gt;
The whole file structure for this app is like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;your git repo folder
  ├─ .gitignore
  ├─ composer.json
  ├─ composer.lock
  ├─ Procfile
  └─ web
      ├─ _h5ai
      ├─ your files
      ├─ and folders
      ├─ more folder or files
      └─ .htaccess
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  On Heroku - Uses heroku dyno shared storage
&lt;/h2&gt;

&lt;p&gt;Deploy it using heroku cli&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git remote set-url origin &amp;lt;your heroku app git url&amp;gt;
&lt;span class="c"&gt;# Put your Files and Folders under web/ directory&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"update files"&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;git push heroku master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  On GitHub - 100 mb file size limit repo size limit 100gb
&lt;/h2&gt;

&lt;p&gt;Open your heroku app and go to deployment and choose the forked repo &lt;br&gt;
Upload files either using github web interface or cli&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Put your Files and Folders under web/ directory&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"update files"&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;git push 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  On Gitlab -1gb file size limit 10gb repo size limit
&lt;/h2&gt;

&lt;p&gt;Import the project to your gitlab account and create a .gitlab-ci.yml inside the project repo &lt;br&gt;
Copy the below code to .gitlab-ci.yml&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;heroku&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
 &lt;span class="na"&gt;stage&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;deploy&lt;/span&gt;

 &lt;span class="na"&gt;script&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
 &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;apt-get update -qy&lt;/span&gt;
 &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;apt-get install -y ruby-dev&lt;/span&gt;
 &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;gem install dpl&lt;/span&gt;
 &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;dpl --provider=heroku --app=$HEROKU_APP_PRODUCTION --api-key=$HEROKU_API_KEY&lt;/span&gt;

 &lt;span class="na"&gt;only&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
 &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;master&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will need to create two CI/CD variables go to project setting&amp;gt; CI/CD&amp;gt; Variables&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$HEROKU_APP_PRODUCTION&lt;/span&gt; &lt;span class="c"&gt;#Name of your app&lt;/span&gt;
&lt;span class="nv"&gt;$HEROKU_API_KEY&lt;/span&gt; &lt;span class="c"&gt;# heroku account api key get it from your heroku account settings&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Upload files either using github web interface or cli&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Put your Files and Folders under web/ directory&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"update files"&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;git push 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Enjoy!
&lt;/h4&gt;

</description>
      <category>heroku</category>
      <category>github</category>
      <category>git</category>
      <category>storage</category>
    </item>
  </channel>
</rss>
