<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>asp.net core 3.1 heroku - Bilişim Kurdu</title>
	<atom:link href="https://bilisimkurdu.github.io/tag/asp-net-core-3-1-heroku/feed/" rel="self" type="application/rss+xml" />
	<link>https://bilisimkurdu.github.io</link>
	<description>Bilişim Hakkında Her Şey</description>
	<lastBuildDate>Wed, 24 Jun 2020 05:30:00 +0000</lastBuildDate>
	<language>tr</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>

<image>
	<url>https://bilisimkurdu.github.io/wp-content/uploads/2020/04/Logo-1-150x150.png</url>
	<title>asp.net core 3.1 heroku - Bilişim Kurdu</title>
	<link>https://bilisimkurdu.github.io</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>ASP.NET Core Uygulamasını Heroku ile Ücretsiz Yayınlamak</title>
		<link>https://bilisimkurdu.github.io/asp-net-core-uygulamasini-heroku-ile-ucretsiz-yayinlamak/</link>
					<comments>https://bilisimkurdu.github.io/asp-net-core-uygulamasini-heroku-ile-ucretsiz-yayinlamak/#respond</comments>
		
		<dc:creator><![CDATA[Yakup CONTARLI]]></dc:creator>
		<pubDate>Wed, 24 Jun 2020 05:30:00 +0000</pubDate>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[İnternet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programlama]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[.net 3.1 heroku publish]]></category>
		<category><![CDATA[.net core 3.1]]></category>
		<category><![CDATA[.net core 3.1 heroku]]></category>
		<category><![CDATA[.net core heroku]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[asp.net 3.1 heroku publish]]></category>
		<category><![CDATA[ASP.NET Core 3.1]]></category>
		<category><![CDATA[asp.net core 3.1 heroku]]></category>
		<category><![CDATA[ASP.NET Core 3.1 Uygulamasını Heroku ile Ücretsiz Yayınlamak]]></category>
		<category><![CDATA[aspnet 3.1 heroku publish]]></category>
		<category><![CDATA[aspnet core 3.1 heroku]]></category>
		<category><![CDATA[bir]]></category>
		<category><![CDATA[circleci]]></category>
		<category><![CDATA[core]]></category>
		<category><![CDATA[dotnet 3.1 heroku publish]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[heroku]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[ile]]></category>
		<category><![CDATA[olu]]></category>
		<category><![CDATA[yaz]]></category>
		<guid isPermaLink="false">https://bilisimkurdu.github.io/?p=807</guid>

					<description><![CDATA[<p>Merhaba Muhterem Ziyaretçilerimiz, Bu yazımda Heroku ile .NET CORE Web uygulamasına nasıl yayımlanacağını anlatmaya çalışacağım. Visual Studio üzerinden hazırlanmışsa: &#8220;%UserProfile%\kullaniciAdi\source\repos\projeAdi\projeAdi&#8221; klasörüne Dockerfile ve .circlei klasörünü ekliyoruz. Dockerfile içeriği .circleci\config.yml içeriği değerleri ile yazıldıktan sonra github ile pushlayıp heroku uygulaması ve circleci projesi oluşturuyoruz. CircleiCI projesi oluşturuken resimdeki gibi uyguluyoruz. Bulid işlemlemine başlayacaktır fakat hata verecektir.&#8230;</p>
<p>The post <a href="https://bilisimkurdu.github.io/asp-net-core-uygulamasini-heroku-ile-ucretsiz-yayinlamak/">ASP.NET Core Uygulamasını Heroku ile Ücretsiz Yayınlamak</a> first appeared on <a href="https://bilisimkurdu.github.io">Bilişim Kurdu</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Merhaba Muhterem Ziyaretçilerimiz,</p>



<p>Bu yazımda Heroku ile .NET CORE Web uygulamasına nasıl yayımlanacağını anlatmaya çalışacağım.</p>



<p>Visual Studio üzerinden hazırlanmışsa:</p>



<p>&#8220;%UserProfile%\kullaniciAdi\source\repos\projeAdi\projeAdi&#8221; klasörüne Dockerfile ve .circlei klasörünü ekliyoruz.</p>



<span id="more-807"></span>



<p><strong>Dockerfile</strong> içeriği</p>



<pre class="wp-block-code"><code>FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
WORKDIR /app

# Copy csproj and restore as distinct layers
COPY *.csproj ./
RUN dotnet restore

# Copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out

# Build runtime image
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
WORKDIR /app
COPY --from=build-env /app/out .
CMD ASPNETCORE_URLS= ./projeAdi</code></pre>



<p><strong>.circleci\config.yml</strong> içeriği</p>



<pre class="wp-block-code"><code>version: 2
jobs:
 build:
   machine: true
   steps:
     - checkout 

     # build image
     - run: |         
         docker info
         docker build -t aspnetapp -f Dockerfile .
     # deploy the image
     - run: |         
         docker login --username=$HEROKU_USERNAME --password=$HEROKU_API_KEY registry.heroku.com
         docker tag aspnetapp registry.heroku.com/$HEROKU_APP_NAME/web
         docker push registry.heroku.com/$HEROKU_APP_NAME/web                
         curl https://cli-assets.heroku.com/install.sh | sh
         heroku container:release web -a $HEROKU_APP_NAME</code></pre>



<p>değerleri ile yazıldıktan sonra github ile pushlayıp heroku uygulaması ve circleci projesi oluşturuyoruz.</p>



<p>CircleiCI projesi oluşturuken resimdeki gibi uyguluyoruz.</p>



<figure class="wp-block-image size-large"><img decoding="async" src="https://i.hizliresim.com/I9ZqIA.png" alt=""/></figure>



<figure class="wp-block-image size-large"><img decoding="async" src="https://i.hizliresim.com/L8GAGK.png" alt=""/></figure>



<p>Bulid işlemlemine başlayacaktır fakat hata verecektir.</p>



<p>Hatanın çözmek ve heroku ile siteyi yayınlanması için &#8220;Project Settings&#8221; -&gt; &#8220;Environment Variables&#8221; yolunu takip ederek aşağıdaki değişkenler eklenir.</p>



<p>HEROKU_APP_NAME :Heroku üzerinden oluşturduğunuz uygulamanın adı</p>



<p>HEROKU_API_KEY :<a href="https://dashboard.heroku.com/account" target="_blank" rel="noreferrer noopener">https://dashboard.heroku.com/account&nbsp;</a>adresinden (&#8220;Reveal&#8221; butonuna tıklayarak) erişebilirsiniz.</p>



<p>HEROKU_USERNAME :Heroku kayıt olurken kullandığınız e-posta adresi <a href="https://dashboard.heroku.com/account" target="_blank" rel="noreferrer noopener">https://dashboard.heroku.com/account</a>&nbsp;adresinden erişebilirsiniz.</p>



<p>Şimdi tekrar build edebiliriz. Build etmek için sol menüden builds sekmesine gidip son fail olan builde tıklayıp sağ üste bulunan&nbsp;<strong>Rerun workflow&nbsp;</strong>butonuna basıyoruz ve build işlemimiz tekrar başlıyor.</p>



<p>Bulid işlemi başarılı ise heroku üzerinden site yayınlanmış olur.</p>



<p>Eğer bu yazıyla ilişkin anlatamadığım\anlaşılamayan konular varsa yazının altına yorum yapabilirsiniz.</p>



<p>İyi günler.</p><p>The post <a href="https://bilisimkurdu.github.io/asp-net-core-uygulamasini-heroku-ile-ucretsiz-yayinlamak/">ASP.NET Core Uygulamasını Heroku ile Ücretsiz Yayınlamak</a> first appeared on <a href="https://bilisimkurdu.github.io">Bilişim Kurdu</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://bilisimkurdu.github.io/asp-net-core-uygulamasini-heroku-ile-ucretsiz-yayinlamak/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
