<?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>DEV Community: Michman</title>
    <description>The latest articles on DEV Community by Michman (@michman).</description>
    <link>https://dev.to/michman</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%2Forganization%2Fprofile_image%2F6480%2F67a4baf9-f2d6-4912-91dc-d42cb25684e2.png</url>
      <title>DEV Community: Michman</title>
      <link>https://dev.to/michman</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/michman"/>
    <language>en</language>
    <item>
      <title>How To Deploy Your Django App With Michman</title>
      <dc:creator>Bogdan Kondratov</dc:creator>
      <pubDate>Tue, 03 Jan 2023 19:41:19 +0000</pubDate>
      <link>https://dev.to/michman/how-to-deploy-your-django-app-with-michman-49cc</link>
      <guid>https://dev.to/michman/how-to-deploy-your-django-app-with-michman-49cc</guid>
      <description>&lt;p&gt;It is good to know how to deploy and maintain your apps yourself, but it may be a lot to learn to begin with and a pain to maintain in the long run.&lt;/p&gt;

&lt;p&gt;That's why services like &lt;a href="https://michman.dev/"&gt;Michman&lt;/a&gt; exist. They provide an abstraction layer between you and your servers by automating provisioning, deployment and maintenance with an easy to use UI to manage your infrastructure.&lt;/p&gt;

&lt;p&gt;Michman takes care of keeping your server secure and up to date, deploying and configuring your apps, setting up HTTPS/SSL certificates, managing background tasks, databases, caches and other software, so you can focus on what you love the most - developing your amazing application.&lt;/p&gt;

&lt;h3&gt;
  
  
  0. Put your project on GitHub
&lt;/h3&gt;

&lt;p&gt;If your project isn't on &lt;a href="https://github.com"&gt;GitHub&lt;/a&gt; yet - you should definitely put it there.&lt;/p&gt;

&lt;p&gt;Most deployment services including Michman are designed to take the source code of your project from a Git storage, like GitHub. It is free and you can keep your GitHub repo private if your project is not open-source.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Sign up on Michman
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VUlLnk9a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yzh61d5d6gvb6fzgmzwr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VUlLnk9a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yzh61d5d6gvb6fzgmzwr.png" alt="Sign up for a free trial on michman.dev" width="880" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://app.michman.dev/register"&gt;Register with a free 30-day trial on Michman&lt;/a&gt; to get going.&lt;/p&gt;

&lt;p&gt;Michman offers a generous 30-day trial and even provides a moneyback guarantee after that, so you can try it with no risk at all.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Sign up on DigitalOcean
&lt;/h3&gt;

&lt;p&gt;Michman uses &lt;a href="https://cloud.digitalocean.com/registrations/new"&gt;DigitalOcean&lt;/a&gt; infrastructure to deploy your apps, so you need an account there to get going. Go ahead and sign up if you don't have an account there yet. &lt;a href="https://cloud.digitalocean.com/registrations/new"&gt;Create an account on DigitalOcean&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Configure DigitalOcean API access
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TscSsFln--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zb28fpjbcluw183cv7pz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TscSsFln--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zb28fpjbcluw183cv7pz.png" alt="Server provider connection form on Michman" width="880" height="833"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Go to your &lt;a href="https://cloud.digitalocean.com/account/api/tokens"&gt;API Tokens page on DigitalOcean&lt;/a&gt; and create a new API token for Michman. Copy-paste it into &lt;a href="https://app.michman.dev/account/providers"&gt;Michman Server Providers page&lt;/a&gt; to add your DigitalOcean account as a server provider on Michman.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Connect your GitHub account with Michman
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yotU59di--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2la51040ujffz02ycjxb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yotU59di--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2la51040ujffz02ycjxb.png" alt="Git provider connection form on Michman" width="880" height="757"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Michman takes your source code from your GitHub repo, which can be either private or public.&lt;/p&gt;

&lt;p&gt;Connecting your GitHub account to Michman is as simple as pressing one button. In Michman go to your &lt;a href="https://app.michman.dev/account/vcs"&gt;Source Control page&lt;/a&gt; and press Connect to GitHub. Then just confirm the connection in a page that opens automatically.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Create a new server for your app
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mTBm0rFc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jpq1hnai7hyqpy5jqdaq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mTBm0rFc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jpq1hnai7hyqpy5jqdaq.png" alt="Server creation on Michman" width="880" height="891"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now with everything set up you can start creating servers! It takes about 30 seconds to create a server and then Michman will configure and secure it for you automatically.&lt;/p&gt;

&lt;p&gt;Go to the &lt;a href="https://app.michman.dev/servers"&gt;Servers Page&lt;/a&gt; on Michman, choose DigitalOcean as a server provider and fill in your server details:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Give your server a descriptive name or stick with a generated one.&lt;/li&gt;
&lt;li&gt;Select type "App Server" for a server with everything needed to run a Django app in one package.&lt;/li&gt;
&lt;li&gt;Select server size you want to use - for a starter you should go with at least 1024 Mb of RAM to run your Django app and everything needed to serve it - web server, database, cache, etc.&lt;/li&gt;
&lt;li&gt;Choose the version of Python that your app requires to run. Go with the latest you're confident with.&lt;/li&gt;
&lt;li&gt;Press &lt;strong&gt;Create Server&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;At this point Michman will take care of everything - request a server from DigitalOcean, set up users, secure access, update software and install everything needed to run your app. The process takes about 10 min.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Create a project on Michman
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6wjwGfrw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c5w78kq1sga7ajrnbqub.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6wjwGfrw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c5w78kq1sga7ajrnbqub.png" alt="Project creation on Michman" width="880" height="909"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As soon as your server is configured you can go ahead and &lt;a href="https://app.michman.dev/servers"&gt;Add Your Project&lt;/a&gt; to Michman. Choose your newly created server and fill in the details of your projects:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Type a domain you have to run your project on.&lt;/li&gt;
&lt;li&gt;Choose Django as the project type. This will tailor the setup for Django. Flask and just generic Python are also available.&lt;/li&gt;
&lt;li&gt;Here you can create a database for your project right away - type a DB name, username and password for it. Don't forget to store that password somewhere safe!&lt;/li&gt;
&lt;li&gt;Press &lt;strong&gt;Create Project&lt;/strong&gt;. It will be created immediately, you can see it in the list below.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  7. Configure DNS for your domain.
&lt;/h3&gt;

&lt;p&gt;Go to your domain provider page and point your domain to the IP address of your server.&lt;/p&gt;

&lt;h3&gt;
  
  
  8. Deploy your app on the server
&lt;/h3&gt;

&lt;p&gt;Now it's time to install and deploy your project.&lt;/p&gt;

&lt;p&gt;Open the project's page and configure the repo to use:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Choose &lt;strong&gt;GitHub&lt;/strong&gt; as your VCS provider.&lt;/li&gt;
&lt;li&gt;Type the full name of the repository with your project like so: &lt;code&gt;username/repo_name&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Type the name of the branch to use for deployment. Most likely &lt;code&gt;main&lt;/code&gt; or &lt;code&gt;master&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Type the path to the public assets directory of your projects, which is just &lt;code&gt;static&lt;/code&gt; for default Django projects.&lt;/li&gt;
&lt;li&gt;We recommend using a Deploy Key, which you need to copy from this page and add to your repo in GitHub in the repository settings before proceeding. You can also uncheck this tick and Michman will add a global access key to your GitHub account on its own, although this way is a bit less secure when you're running multiple projects.&lt;/li&gt;
&lt;li&gt;Press Install Repository and Michman will configure the server for your project and copy sources from your repo.&lt;/li&gt;
&lt;li&gt;If you app uses &lt;code&gt;.env&lt;/code&gt; configuration file, which we highly recommend, go to Configuration page of your project and make sure the &lt;code&gt;.env&lt;/code&gt; file contains everything your project needs to run. Check out other configuration options on this page as well, although default ones will likely be fine for a start.&lt;/li&gt;
&lt;li&gt;The project is not deployed yet, though. It isn't available for your users. For this to happen you just have to press &lt;strong&gt;Deploy Now&lt;/strong&gt; button to run a manual deployment.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6xz-VsET--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/13t987fnnzddhwp7i7nx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6xz-VsET--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/13t987fnnzddhwp7i7nx.png" alt="Project deployment on Michman" width="880" height="434"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Voilà! Your project is deployed and accessible to users.&lt;/p&gt;

&lt;h3&gt;
  
  
  9. Configure HTTPS/SSL
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--quy1LWQJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7kf803zgbqq6r9vpe6mw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--quy1LWQJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7kf803zgbqq6r9vpe6mw.png" alt="One-button HTTPS setup on Michman" width="880" height="737"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To make it more secure for your users you want your project to be served over HTTPS/SSL.&lt;/p&gt;

&lt;p&gt;Go to your server's page on Michman and open SSL section. Type the domain name you have and press &lt;strong&gt;Request Certificate&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Michman will get a free industry-standard certificate from Let's Encrypt and setup automatic renewals for you.&lt;/p&gt;

&lt;p&gt;Note that your domain must already be pointed at your server with a DNS record. Otherwise Let's Encrypt will fail to verify that the domain actually belongs to this server.&lt;/p&gt;

&lt;p&gt;Michman will configure HTTPS for your project automatically from this point.&lt;/p&gt;

&lt;h3&gt;
  
  
  10. Automate future deployments
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qC4U6DY5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/not8u8u2cp3oqsngnvrq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qC4U6DY5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/not8u8u2cp3oqsngnvrq.png" alt="Automatic deployment on Michman" width="880" height="664"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Michman has an automatic deployment feature called &lt;strong&gt;Quick Deploy&lt;/strong&gt;. You can enable it on your project's page. Any time you push a change to the branch chosen for deployment in your GitHub repo Michman will take this most recent version of your code and deploy it on your server.&lt;/p&gt;




&lt;p&gt;Read more in details about all the features in the official Michman documentation: &lt;a href="https://docs.michman.dev/"&gt;docs.michman.dev&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Eoh26iBp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w26pge8agouau1to9do3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Eoh26iBp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w26pge8agouau1to9do3.png" alt="Michman documentation" width="880" height="501"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>django</category>
      <category>deployment</category>
      <category>python</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
