Answers: <p>What you're looking for is a CI/CD pipeline.  There's lots of articles around it, but the main steps would be as follows:</p>
  <ol>
  <li><p>Some form of build artifact (it can be a docker container, but it can also be a tarball, or just code in a git repo).</p>
  </li>
  <li><p>Some way to automatically deploy your code.  This is done by using a CI/CD tool (literally any of them will work fine, but for the love of god, don't use Jenkins, you'll thank me later).</p>
  </li>
  </ol>
  <p>For something as simple as how you describe your app, you can just use a CICD tool to SSH in and deploy to your existing server.</p>
  <p>For example, CircleCI (one of my favourite tools and what we use at my current job), has a free tier that gives you 2500 minutes of build time a month.  It also has an <a href="https://circleci.com/developer/orbs/orb/arturgontijo/ssh-deployment" rel="nofollow noreferrer">SSH orb</a> you can include in your pipeline configuration that will SSH into your server and run a few commands to pull down the latest code and restart your server.</p>
  <p>Here is a good <a href="https://circleci.com/docs/2.0/getting-started/" rel="nofollow noreferrer">Getting Started guide</a> that should get you up and running with Circle.</p>
  <p>If you'd like to start using docker, here is a <a href="https://docs.docker.com/compose/django/" rel="nofollow noreferrer">good guide</a> on how to run your Django app with it.  From there, you would need to set up a Dockerhub account and push your docker image there, to be deployed on a server.  Note you'll have to make sure you can configure your application through environment variables.  It's never a good idea to have an artifact with &quot;baked in&quot; configuration, since this method doesn't scale in any real way.</p>
  
Answers: CC BY-SA 4.0
Answers: 2021-01-27T13:40:02.970Z
Answers: 2021-01-27T13:40:02.970Z
Answers: maplebird
Body: <p>I have made a web application in django. Currently I'm deploying by SSH'ing into my ubuntu instance at AWS and using git pull.
  However  I know this isn't a very scaleable solution but I have very limited knowledge of DevOps.
  So, my question is if anyone could recomend which applications I need to use to achieve the following:</p>
  <ul>
  <li>I can launch more instances with just a click (probably Docker if I've understood it?)</li>
  <li>When I git push by project, all running servers pull and run migrations and reboot.</li>
  </ul>
  
Tags: <docker>
Title: Deply method for python project
UserDisplayName: Felix Eklöf
ThreadText: # Deply method for python project
  
  (Asked by: username_0 on 2021-01-27)
  
  I have made a web application in django. Currently I'm deploying by SSH'ing into my ubuntu instance at AWS and using git pull.
  However I know this isn't a very scaleable solution but I have very limited knowledge of DevOps.
  So, my question is if anyone could recomend which applications I need to use to achieve the following:
  
  * I can launch more instances with just a click (probably Docker if I've understood it?)
  * When I git push by project, all running servers pull and run migrations and reboot.
  
  **Tags:** docker
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-01-27. Score: 3 | Accepted answer
  
  What you're looking for is a CI/CD pipeline. There's lots of articles around it, but the main steps would be as follows:
  
  1. Some form of build artifact (it can be a docker container, but it can also be a tarball, or just code in a git repo).
  2. Some way to automatically deploy your code. This is done by using a CI/CD tool (literally any of them will work fine, but for the love of god, don't use Jenkins, you'll thank me later).
  
  For something as simple as how you describe your app, you can just use a CICD tool to SSH in and deploy to your existing server.
  
  For example, CircleCI (one of my favourite tools and what we use at my current job), has a free tier that gives you 2500 minutes of build time a month. It also has an [SSH orb](https://circleci.com/developer/orbs/orb/arturgontijo/ssh-deployment) you can include in your pipeline configuration that will SSH into your server and run a few commands to pull down the latest code and restart your server.
  
  Here is a good [Getting Started guide](https://circleci.com/docs/2.0/getting-started/) that should get you up and running with Circle.
  
  If you'd like to start using docker, here is a [good guide](https://docs.docker.com/compose/django/) on how to run your Django app with it. From there, you would need to set up a Dockerhub account and push your docker image there, to be deployed on a server. Note you'll have to make sure you can configure your application through environment variables. It's never a good idea to have an artifact with "baked in" configuration, since this method doesn't scale in any real way.
  
  
  ---
  
  