<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Balaji Boominathan on Medium]]></title>
        <description><![CDATA[Stories by Balaji Boominathan on Medium]]></description>
        <link>https://medium.com/@balaji2198?source=rss-48d301d3081e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*7lOm7AtIhQ-vHeXj.</url>
            <title>Stories by Balaji Boominathan on Medium</title>
            <link>https://medium.com/@balaji2198?source=rss-48d301d3081e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 04:21:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@balaji2198/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Deploying Strapi on Heroku]]></title>
            <link>https://medium.com/techzap/deploying-strapi-on-heroku-ac48e663afd8?source=rss-48d301d3081e------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac48e663afd8</guid>
            <category><![CDATA[strapi]]></category>
            <category><![CDATA[cms]]></category>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[heroku]]></category>
            <category><![CDATA[postgres]]></category>
            <dc:creator><![CDATA[Balaji Boominathan]]></dc:creator>
            <pubDate>Tue, 26 May 2020 07:19:53 GMT</pubDate>
            <atom:updated>2020-05-26T07:19:53.806Z</atom:updated>
            <content:encoded><![CDATA[<h3>Deploying Strapi app on Heroku</h3><p>This article guides you to set up the Strapi on Heroku with the PostgreSQL Database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W7v4O1RBT8IOFHM9cnjNEA.png" /><figcaption>Source: <a href="https://strapi.io/">https://strapi.io/</a></figcaption></figure><h3>What is Strapi?</h3><blockquote><strong>Strapi</strong> is an open-source, Node. js based, headless CMS to manage content and make it available through a fully customizable API. It is designed to build practical, production-ready Node. js APIs in hours instead of weeks.</blockquote><p>Strapi is easy to customize and deploy the application. It supports both REST and GraphQL API. The application is entirely written on Javascript. It supports integration with various platforms like SendGrid, Algolia, Cloudinary, etc.</p><blockquote>Interesting Fact: Recently Strapi has raised<a href="https://strapi.io/blog/announcing-strapi-10m-series-a-funding"> $10 million in Series A funding</a>.</blockquote><h3>What is Heroku?</h3><p>Heroku is a cloud application platform that provides Platform as a Service(PaaS). It supports various services like GitHub Integration, Continuous Delivery, and supports plenty of Add-ons. Heroku is easy to use and we can deploy the applications easily.</p><h3>Heroku Setup</h3><p>If you don’t have an account in <a href="https://www.heroku.com/">Heroku</a>, Go ahead and create one.</p><p>Then go to the Heroku dashboard and create a new app. You need to give the unique and choose a region.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*papTLRMrKkXPFvNrZ6sIkw.png" /><figcaption>Heroku app creation</figcaption></figure><p>After creating the application, go to the Resources tab and you’ll find the Add-ons section. In that type Postgres, you’ll get the Heroku Postgres in suggestion. Click on that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PZn0MbAz4kjRKAk1UmUMIQ.png" /></figure><p>The pop-up will appear, click Provision.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/1*YCmSLlvBJFT47KNcahDfHw.png" /><figcaption>Postgress add-on</figcaption></figure><p>Now the Postgres add-on is installed in your application.</p><p>Head over to the Settings tab and find the Config vars section, click on the Reveal Config Vars button. You’ll see the Database URL. Copy that to clipboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mgnyOVMEBC3hBsmspTk9hA.png" /></figure><p>The URL will look like postgres://DATABASE_USERNAME:DATABASE_PASSWORD<a href="/service/mailto:5d717be65309f63c356a0c4f934b6281c6e17bce2fca9d4d3baeeb52033a94c2@ec2-52-201-55-4.compute-1.amazonaws.com">@</a>DATABASE_HOST:DATABASE_PORT/DATABASE_NAME</p><p>Set up the Config Vars to their appropriate value. Finally the Config Vars will look like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hv_2P2UEyw5ZOwtJAz6ufQ.png" /><figcaption>DB configs</figcaption></figure><p>Heroku CLI gives you an option to create and manage your Heroku apps from your Terminal. <a href="https://devcenter.heroku.com/articles/heroku-cli">Install the Heroku CLI</a> follow the instructions w.r.t your operating system.</p><pre>$heroku login</pre><p>This command is used to configure the Heroku CLI with your account.</p><h3>Strapi Setup</h3><p>We can install the Strapi through yarn or npm. You must have yarn or npm/npx installed.</p><p>To Create a strapi project using yarn. Execute this command.</p><pre>$yarn create strapi-app your-project-name --quickstart</pre><p>If you want to use npx. Execute this command</p><pre>$npx create-strapi-app your-project-name --quickstart</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NiIAFSYnVub8Hoj_AXFqKg.png" /><figcaption>Strapi project installation</figcaption></figure><p>Now move to the project directory and open the <em>databse.json</em> file in the <strong>config/environments/production</strong>.</p><p>In the <strong>databse.json</strong> file change the client to “postgres”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/0*t51yMqX6roJsE477" /><figcaption>database.json file</figcaption></figure><p>Then you need to install the Postgres package by this command</p><pre>$npm install pg --save</pre><h3>Git Flow</h3><p>Now inside your project directory Execute this <em>git init</em> command. This will make your project a Git project.</p><pre>$git init</pre><p>Now update the .gitignore file with package-lock.json andyarn.lock</p><p>Now to connect to the app we created in the Heroku. We need to execute this command. Replace the name with your Heroku app name which you created initially.</p><pre>$heroku git:remote -a your-heroku-app-name</pre><p>Now add the files to the staging area in Git.</p><pre>$git add .</pre><p>Now Commit your changes</p><pre>$git commit -m &quot;Initial commit&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YXsdlNS-afNUoP-s3W5sBA.png" /></figure><h3>Deploy to Heroku</h3><blockquote>This is where magic happens</blockquote><pre>$ git push heroku master</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*X0Tmm0D7SG6_gIq4TNEgrw.png" /><figcaption>Heroku Deploy</figcaption></figure><p>It starts deploying your project to the Heroku. After Deployed you’ll get an URL of the application. Open that or You can open the application from your Heroku Dashboard. If you open the URL you’ll see this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oN1_uTdvQRuqdPQEkSwWcA.png" /><figcaption>Landing page</figcaption></figure><p>If you see this, Congrats!!! Your app is successfully deployed. You can now move to the admin dashboard by adding the /admin at the end of your app URL.</p><pre>Eg: <a href="https://stapi-image.herokuapp.com/">&lt;your-app-name&gt;.herokuapp.com/</a>admin</pre><p>You’ll see the admin Signup page. Something similar to the image below. Enter the credentials and Signup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*IZ8TaCHVOW2cYZWh3AKqsw.png" /><figcaption>Strapi Admin Signup</figcaption></figure><p>After the Signup you’ll see the Strapi Admin Dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C0aTjdc9fP5Gdh6YOPybkw.png" /></figure><p>Congrats! You’ve successfully deployed the Strapi application on Heroku. I hope this article has helped you in some way. If you face any issues, feel free to comment. Thank you :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac48e663afd8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/techzap/deploying-strapi-on-heroku-ac48e663afd8">Deploying Strapi on Heroku</a> was originally published in <a href="https://medium.com/techzap">techzap</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create your first Docker Container]]></title>
            <link>https://medium.com/techzap/create-your-first-docker-container-b8a5e4a2fdc2?source=rss-48d301d3081e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8a5e4a2fdc2</guid>
            <category><![CDATA[flask]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[containers]]></category>
            <dc:creator><![CDATA[Balaji Boominathan]]></dc:creator>
            <pubDate>Thu, 07 May 2020 15:09:36 GMT</pubDate>
            <atom:updated>2020-05-07T15:09:36.676Z</atom:updated>
            <content:encoded><![CDATA[<p>This is a very simple tutorial for getting started with Docker. I’ll try to keep this as simple as possible. In this, we are going to build a basic Flask application and dockerize the application. By the end of this tutorial, you’ll get familiar with Docker and a few Docker commands.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M3sWEaYW8Y0wfl6Rzgx4lQ.png" /><figcaption>Docker man page</figcaption></figure><h3>Overview of Docker</h3><p>Docker is a platform for developing and running applications. It automates the deployment of applications. It’s a tool for running applications in an <strong>isolated</strong> environment. Docker makes it easy to share an application with all of its dependencies across different environments.</p><h3>Docker Image</h3><p>Image is a template for creating an environment. The Docker image contains the Operating System, Software, and application code. These are all packaged in a single file. Images are defined with the Dockerfile.</p><h3>Dockerfile</h3><blockquote>Dockerfile is built into a docker image</blockquote><p>The Dockerfile contains the steps that are needed to package your application(to create the image). These steps include configuring the Operating system, install the required packages or software, copy the files from one place to another.</p><h3>Create the Flask application</h3><blockquote>Let’s dive into code</blockquote><p><a href="https://pypi.org/project/Flask/">Flask</a> is the micro web framework for building small web applications.</p><p>The directory structure is as follows:</p><pre>flaskapp/<br>├─── Dockerfile<br>├─── app.py<br>├─── requirements.txt</pre><p>Create a directory with the name of your choice. The command for creating a directory in Linux is,</p><pre>$mkdir flaskapp</pre><p>Navigate inside the directory you created. Now create a file named app.py and copy the following code to it.</p><p><strong>app.py</strong></p><pre>from flask import Flask<br>app = Flask(__name__)</pre><pre>@app.route(&#39;/&#39;)<br>def hello_world():<br>    return &#39;Hello, This is my first Docker app!&#39;</pre><pre>if __name__ == &quot;__main__&quot;:<br>    app.run(debug=True, host=&#39;0.0.0.0&#39;)</pre><p>This is a simple Hello world Flask app. If you want to learn about flask in detail, then visit <a href="https://flask.palletsprojects.com/en/1.1.x/quickstart/">this page</a> and explore about flask. Let’s concentrate more on Docker now.</p><p>Then create the requirements.txt file. Add the following line to it.</p><p><strong>requirements.txt</strong></p><pre>Flask==1.1.2</pre><p>Now we are going to create a Dockerfile that dockerizes this application.</p><h3>Write the Docker File</h3><blockquote>The Dockerfile should not have any extension.</blockquote><p>If you haven’t downloaded the docker yet. Get the <a href="https://docs.docker.com/get-docker/">Docker from here</a>. Detailed installation instructions can be <a href="https://www.docker.com/get-started">found here</a>.</p><p>Create a file called Dockerfile. This must start with capital letter D.</p><p><strong>Dockerfile</strong></p><pre>FROM alpine:3.11</pre><pre>RUN apk add --update python</pre><pre>RUN apk add --update py-pip</pre><pre>COPY ./requirements.txt /app/requirements.txt</pre><pre>COPY . /app</pre><pre>WORKDIR /app</pre><pre>RUN pip install -r requirements.txt</pre><pre>EXPOSE 5000</pre><pre>CMD python app.py</pre><p>Let’s look at the instructions line by line to have a better understanding</p><pre>FROM alpine:3.11</pre><p>This is our base image. There are a lot of images available in the <a href="https://hub.docker.com/">Dockerhub</a>. We choose alpine since it’s one of a lightweight image.</p><p>The <strong>FROM </strong>allows us to initialize the build over the base image. The number after the colon is the version number. A valid Dockerfile always starts with FROM keyword.</p><pre>RUN apk --update add python<br>RUN apk add --update py-pip</pre><p>These two lines are used to install the python and the pip package respectively. The <strong>RUN</strong> instruction will execute a new layer on top of the current image. This instruction is used to install packages and creating new directories.</p><pre>COPY ./requirements.txt /app/requirements.txt</pre><pre>COPY . /app</pre><p>The <strong>COPY</strong> instruction is used to copy the files from source(.) to the destination(/app). The ‘.’ represents the current directory. This basically copies the flask app into the image.</p><pre>WORKDIR /app</pre><p>The <strong>WORKDIR</strong> sets the working directory.</p><pre>RUN pip install -r requirements.txt</pre><p>This reads the requirements.txt file and installs the specified packages one by one on the host.</p><pre>EXPOSE 5000</pre><p>The <strong>EXPOSE </strong>exposes a port that is used by Flask. When you run the image you’ll get a container that container will run on this port.</p><pre>CMD python app.py</pre><p><strong>CMD</strong> is the command that is executed when you start a container. Here, you are using the command to run your Python application. There can be only one CMD per Dockerfile. If you specify more than one, then the last CMD will take effect.</p><p>When you start a container this command is executed. There should be only one <strong>CMD </strong>instruction in the Dockerfile. If there is more than one, it’ll execute the last instruction.</p><h3>Build the docker image</h3><blockquote>Enough of information. Let’s run the application</blockquote><p>To build the Docker image, execute this command in the terminal in the directory we created.</p><pre>$docker build -t flask-app .</pre><p>The <em>-t is used to name your image flask-app. The </em><em>. , in the end, represents the current directory. When you execute this for the first time, it’ll have to download all of the layers that make up to build the image. After that, it’ll use the cache. If you’re not an administrator, try to run the command with the </em><em>sudo.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-wNh2jrE7lt9pTklFTMNJg.png" /><figcaption>docker build log</figcaption></figure><p>To run the application, execute this command</p><pre>$docker run -p 5000:5000 flask-app</pre><p>The -p is used to map the <em>port running inside the container to your host. Here we’re mapping the port 5000. The value before the colon represents the port running on your host and the value after colon represents the port running inside the container.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*umEQ_2q8GdRQzl4Jz6LLTQ.png" /></figure><p>Now, navigate to <a href="http://localhost:5000/">http://localhost:5000/</a> in your browser, you’ll see the “Hello, This is my first Docker app!” in the window.</p><h3>Container</h3><p>To know the container id enter the following command in your terminal.</p><pre>$docker ps</pre><p>This lists all the running containers in the Docker engine. This has information about containers like its ID, created time, status and on which port it’s running.</p><pre>$docker ps -a</pre><p>This will list the containers that have been stopped as well.</p><pre>$docker stop [container name]</pre><p>This will stop all the running containers.</p><p>I hope now you have a better understanding about Docker and how to write your Dockerfile. Keep Dockerizing more apps. Cheers!</p><p>Resources:</p><ol><li><a href="https://docs.docker.com/get-started/">https://docs.docker.com/get-started/</a></li><li><a href="https://docs.docker.com/reference/">https://docs.docker.com/reference/</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8a5e4a2fdc2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/techzap/create-your-first-docker-container-b8a5e4a2fdc2">Create your first Docker Container</a> was originally published in <a href="https://medium.com/techzap">techzap</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>