Answers: <p>One option that you could consider is using a continuous deployment tool like Jenkins, Travis CI, or GitLab CI. These tools can automatically deploy your code to a production server whenever you push your code to a certain branch in your git repository. This can save you the time and effort of manually deploying your code to your production server every time you make a change.</p>
  <p>Another option is to use a service like Heroku, which makes it easy to deploy and manage your web applications. With Heroku, you can simply push your code to a git repository, and Heroku will automatically build and deploy your application.</p>
  <p>Ultimately, the best option will depend on your specific needs and preferences, so it may be worth experimenting with different approaches to see what works best for you.</p>
  
Answers: CC BY-SA 4.0
Answers: 2022-12-04T13:41:39.427Z
Answers: 2022-12-04T13:41:39.427Z
Answers: Haim Cohen
Answers: <p>Probably you can not do it on a way as it is being done in really productive environments. The cause is very simple: normally, prod servers have a lot of additional functionality, which is simply not reasonable if you have a single web app.</p>
  <p>For example:</p>
  <ul>
  <li>You might use multiple servers to handle the case if one of them goes down</li>
  <li>You might use monitoring, i.e. something must alarm you if anything goes down</li>
  <li>You likely want backups in remote locations, for the case if important data would lost on any reason (including your own accidental deletion commands)</li>
  <li>You might use complex deployment strategies to update your site without a downtime. It is always possible but sometimes it can be surprisingly complex.</li>
  <li>And, most importantly, you likely want to execute these on the possible most automatized way.</li>
  </ul>
  <p>Wiring these together is a huge work, it requires a larger infrastructure as a single server, and very likely it is not feasible for a single-person product.</p>
  <p>However, your question is not about that. Your question is a single-server solution. I would not call it &quot;prod&quot;, I think it is more like a &quot;PoC&quot; or &quot;UAT&quot; site.</p>
  <p>That you can do. Download gitlab or gitlab-ci or ansible, learn linux and will work. There is nothing magic here, we are using a set of interconnecting tools and services.</p>
  
Answers: CC BY-SA 4.0
Answers: 2024-08-26T19:59:12.473Z
Answers: 2024-08-26T19:59:12.473Z
Answers: peterh
Body: <p>I'm new to DevOps and overwhelmed with all the options.</p>
  <p>I write python web applications as a solo developer, on my local machine. I have a &quot;staging&quot; server and I have multiple websites under different subdomains (eg. myapp.staging.mywebsite.dev). I use git on my local machine and use branches to create multiple versions of my apps and then I use git to push my code to this server so I can see how it looks on the web.</p>
  <p>When I'm happy with my web app I want to be able to deploy it to a separate production server, so I can get real users using my apps. I could just use git to push my code to a new server but are there any other options that will help me create a live site?</p>
  
Comments: CC BY-SA 4.0
Comments: 2022-12-04T10:56:10.620Z
Comments: https://fly.io/docs/django/getting-started/
Comments: Kyslik
Comments: CC BY-SA 4.0
Comments: 2024-08-26T19:47:41.057Z
Comments: @Kyslik Afaik OP is already good in Python, he is not enough good in servers.
Comments: peterh
Tags: <python><servers>
Title: Options to build a production server as a solo python developer?
UserDisplayName: DumbMathBoy
ThreadText: # Options to build a production server as a solo python developer?
  
  (Asked by: username_0 on 2022-12-03)
  
  I'm new to DevOps and overwhelmed with all the options.
  
  I write python web applications as a solo developer, on my local machine. I have a "staging" server and I have multiple websites under different subdomains (eg. myapp.staging.mywebsite.dev). I use git on my local machine and use branches to create multiple versions of my apps and then I use git to push my code to this server so I can see how it looks on the web.
  
  When I'm happy with my web app I want to be able to deploy it to a separate production server, so I can get real users using my apps. I could just use git to push my code to a new server but are there any other options that will help me create a live site?
  
  **Tags:** python, servers
  
  > **Comments:**
  > **username_1**: https://fly.io/docs/django/getting-started/  
  > **username_2**: @username_1 Afaik OP is already good in Python, he is not enough good in servers.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2022-12-04. Score: 0
  
  One option that you could consider is using a continuous deployment tool like Jenkins, Travis CI, or GitLab CI. These tools can automatically deploy your code to a production server whenever you push your code to a certain branch in your git repository. This can save you the time and effort of manually deploying your code to your production server every time you make a change.
  
  Another option is to use a service like Heroku, which makes it easy to deploy and manage your web applications. With Heroku, you can simply push your code to a git repository, and Heroku will automatically build and deploy your application.
  
  Ultimately, the best option will depend on your specific needs and preferences, so it may be worth experimenting with different approaches to see what works best for you.
  
  
  ---
  
  ### Answer by username_2 on 2024-08-26. Score: 0
  
  Probably you can not do it on a way as it is being done in really productive environments. The cause is very simple: normally, prod servers have a lot of additional functionality, which is simply not reasonable if you have a single web app.
  
  For example:
  
  * You might use multiple servers to handle the case if one of them goes down
  * You might use monitoring, i.e. something must alarm you if anything goes down
  * You likely want backups in remote locations, for the case if important data would lost on any reason (including your own accidental deletion commands)
  * You might use complex deployment strategies to update your site without a downtime. It is always possible but sometimes it can be surprisingly complex.
  * And, most importantly, you likely want to execute these on the possible most automatized way.
  
  Wiring these together is a huge work, it requires a larger infrastructure as a single server, and very likely it is not feasible for a single-person product.
  
  However, your question is not about that. Your question is a single-server solution. I would not call it "prod", I think it is more like a "PoC" or "UAT" site.
  
  That you can do. Download gitlab or gitlab-ci or ansible, learn linux and will work. There is nothing magic here, we are using a set of interconnecting tools and services.
  
  
  ---
  
  