<?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 Karthik Sagar on Medium]]></title>
        <description><![CDATA[Stories by Karthik Sagar on Medium]]></description>
        <link>https://medium.com/@karthiksagar?source=rss-4945e253678e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*JHSbsgJU5FJvClGf.</url>
            <title>Stories by Karthik Sagar on Medium</title>
            <link>https://medium.com/@karthiksagar?source=rss-4945e253678e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 15 Nov 2026 14:29:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@karthiksagar/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[How to Deploy Angular 8 app on Google Cloud Platform ( GCP ) ?]]></title>
            <link>https://medium.com/@karthiksagar/how-to-deploy-angular-8-app-on-google-cloud-platform-gcp-cdd79e5cc5cf?source=rss-4945e253678e------2</link>
            <guid isPermaLink="false">https://medium.com/p/cdd79e5cc5cf</guid>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[angular]]></category>
            <dc:creator><![CDATA[Karthik Sagar]]></dc:creator>
            <pubDate>Wed, 13 Nov 2019 04:18:06 GMT</pubDate>
            <atom:updated>2019-11-13T04:18:06.697Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Deploy Angular 8 app on Google Cloud Platform ( GCP ) ?</h3><p>Deploying your production version of app feels overwhelming when we do not have right resource. The process is quite simple. Once you get hang of it, it feels quite simple. If you are juggling on how to deploy Angular App on GCP, you have come to right place.</p><p>There are two ways —</p><ol><li><strong><em>Google Compute Engine</em></strong>: GCE is Infrastructure-as-a-service i.e. IaaS ( We would get a box )</li><li><strong><em>Google App Engine</em></strong>: GAE is Platform-as-a-service i.e. PaaS. ( We need not worry about scaling and use the service )</li></ol><p>We would be using Google App Engine to deploy our angular app in 5 steps.</p><h3>Step 1 : Build production version of your Angular App</h3><p>&gt; ng build — prod</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*50hg1NIyRIZGykRwK3GjQA.png" /></figure><p>At the end of this step, new folder <strong><em>dist </em></strong>will be created containing these minified CSS and JS files. ( It is quite interesting as to how our entire code is compressed and optimized to these few files )</p><h3><strong>Step 2 : Create new configuration file required for hosting</strong></h3><p>We need to create a new file <strong>app.yaml</strong> to specify the few configurations like that guides GCP to find starting directory, static files and others as you see below.</p><p>Copy the below contents to newly created <strong>app.yaml</strong> file</p><pre>runtime: python27</pre><pre>api_version: 1</pre><pre>threadsafe: true</pre><pre>handlers:</pre><pre>- url: /</pre><pre> static_files: &lt;YOUR_APP_NAME&gt;/index.html</pre><pre> upload: &lt;YOUR_APP_NAME&gt;/index.html</pre><pre>- url: /</pre><pre>static_dir: &lt;YOUR_APP_NAME&gt;</pre><p><strong>Important</strong> — Place this file inside dist folder. Please see the directory structure in the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jmtFSYoTlo09KAxhBBAiRA.png" /></figure><h3>Step 3 : Configuration in GCP UI</h3><p>a) Login to <a href="https://console.cloud.google.com/">Google console</a> to create new project ( e.g. angular-project )</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KbUKl0ZPybqpiOenM6Fshg.png" /></figure><p>b) Create new <a href="https://console.cloud.google.com/storage/browser">Google Storage Bucket</a> in the same project. ( Just name your bucket and keep rest of details default )</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7MEPwjGkQ4mHVeXqTxunxQ.png" /></figure><p>c) Upload your <strong>project folder</strong> and <strong>app.yaml </strong>file to the newly created bucket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VttRTYAMChKyNmNvVz4lgA.png" /></figure><h3>Step 4 : Sync the data in your bucket to your project</h3><p>a) Login to Google cloud console by clicking console icon from top right of the console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/167/0*3iB--1iCVH3ehPk9" /></figure><p>b) create a new directory</p><pre>&gt; mkdir angular-gcp-app</pre><p>c) Sync data from bucket to this directory</p><pre>&gt; gsutil rsync -r gs://angular-appname-bucket ./angular-gcp-app</pre><p>d) Go inside the directory and deploy the gcp</p><pre>&gt; cd angular-gcp-app<br>&gt; gcloud app deploy </pre><p>Woohoo Done !</p><p>Deployment Url will be displayed in the console. E.g. [https://angular-gcp-app.appspot.com]</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cdd79e5cc5cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>