Giter Site home page Giter Site logo

Decide how to deploy this app about editdojo HOT 30 OPEN

ykdojo avatar ykdojo commented on July 27, 2024
Decide how to deploy this app

from editdojo.

Comments (30)

Tipuch avatar Tipuch commented on July 27, 2024 2

For a start I think pythonanywhere is a great fit for this projet, afterwards depending on how much money you're prepared to spend for the server I'd suggest DigitalOcean (cheaper) or any cloud solution (preferably AWS and GCP) (more expansive generally).

If we use DigitalOcean, the stack nginx + gunicorn (mentioned by @cameron-dahl ) with WSGI is a pretty popular / solid stack, we'll probably also need some deployment tools (I'd advise for ansible https://www.ansible.com/ or fabric https://github.com/fabric/fabric) ansible is more complete / robust / high-end but it needs some additional knowledge and some configuration.
Fabric is made in python and with python which is a plus and it is pretty useful for smaller deployment scripts or smaller projects. Cloud solutions have the advantage of having pre-configured environments and easier tooling for deployment.

Docker is a great tool but its complexity should be taken into account, I think it's a great tool to offer a stable development environment via docker-compose locally and it's also great to manage highly available applications through kubernetes and/or nomad but for our use-case I'm not sure it's the best / less complicated option available.

from editdojo.

ykdojo avatar ykdojo commented on July 27, 2024 1

Why Digital Ocean?

from editdojo.

didoloan avatar didoloan commented on July 27, 2024 1

Because they have affordable VPS hosting plans.

from editdojo.

cameronthecoder avatar cameronthecoder commented on July 27, 2024 1

If we deploy this to DigitalOcean, we need to make sure we're doing it right with a web server like nginx and gunicorn because we don't just use Django's built in development server. Why? Because it is a development server, and it is not meant for production. I would not recommend Apache (another web server) with mod_wsgi (an Apache module to host Python apps) because I've never gotten that to work. When I deploy an app to DigitalOcean, I always follow this guide to set it up with nginx and gunicorn. If we don't want to do that, our next best option is to go with Heroku or PythonAnywhere like @ykdojo said.

from editdojo.

utkarshdubey avatar utkarshdubey commented on July 27, 2024 1

I think using Docker would open new directions for beginners and people on the intermediate level. Using docker with Digital Ocean would be the best for it will be easy to deploy it with Docker.

from editdojo.

ykdojo avatar ykdojo commented on July 27, 2024 1

from editdojo.

ykdojo avatar ykdojo commented on July 27, 2024 1

Okay, thank you, everyone!

I think I'll do some research on Digital Ocean, Heroku, and PythonAnywhere. I'll try and see which one's the best option for this particular project. I'll do some research on MySQL vs. PostgreSQL, too.

from editdojo.

ZEDGR avatar ZEDGR commented on July 27, 2024 1

Hello there!

I will like to give my humble opinion about the deployment of this awesome project/idea.

About the DB: I will suggest PostgreSQL. Because is the most favored database from the Python and Django community. Therefore you will see that for PostgreSQL the Django ORM has better support in many of its features.

About the Cloud Provider/Host: GCP and AWS is giving you 12-months free tier for many services. I think that GCP is a good place to start because it also offers extra $300 credits.

About Kubernetes & Docker I think that there are awesome technologies but there are "overkill" for now

from editdojo.

Jonathantsho avatar Jonathantsho commented on July 27, 2024 1

I highly recommend AWS, like @ZEDGR said - you get 12 months free usage for ec2 ( to host your server) and also 12 months free usage for RDS (host database). The free tier will be more than enough to build your MVP/prototype off of.

Check out more info at: https://aws.amazon.com/free/

AWS also has by far the best support in terms of stack overflow Q&A, making it much easier in terms of time spent debugging.

DB: I suggest PostgreSQL as well.

Jonathan

from editdojo.

ykdojo avatar ykdojo commented on July 27, 2024 1

Okay, thanks Jonathan. I think I'll go with AWS then

from editdojo.

ykdojo avatar ykdojo commented on July 27, 2024 1

Hmm why is it not good on production?

from editdojo.

didoloan avatar didoloan commented on July 27, 2024

I think we should use Digital Ocean

from editdojo.

ykdojo avatar ykdojo commented on July 27, 2024

@Camnooten Thank you for the detailed explanation! I'm new to this, so this is super helpful to me personally.

from editdojo.

cameronthecoder avatar cameronthecoder commented on July 27, 2024

You're welcome! I love adding my 2 cents to projects like this.

from editdojo.

utkarshdubey avatar utkarshdubey commented on July 27, 2024

The benefits are simple,
It provides stabilization in a great way as you can run it anywhere and the installation do the running of the application would be same.
Also it is good in terms of isolation and security. We also don't have to install various other tools like Gunicorn for deploying as dockers containers are enough. More on docker could be found at http://docker.com

from editdojo.

ykdojo avatar ykdojo commented on July 27, 2024

from editdojo.

alpharomeo7 avatar alpharomeo7 commented on July 27, 2024

I have worked on Django before for my Web Application. For Deployment I used Digital Ocean. And as mentioned earlier by others, it is quite affordable and user

Digital Ocean has a server option dedicated to Django specifically. It uses Nginx and Gunicorn. Even though I knew nothing about hosting Django at that time, I was able to host my project in no time with the help of their guide and sentdex video tutorial

https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-18-04.
This is really helpful!

It also has access to certbot which helps you get access to SSL easily, Mekong your web application secure.

I could recommend AWS and Google Cloud since it’s free and easily scalable, but I found those extremely complicated. And they are mainly used for huge websites.

I don’t have much experience with Docker. But there are issues whenever I try to create one on my computer. I believe that Docker is not really required in this case.

I hope I was helpful.

BTW are you using SQLite or PostgreSQL?

from editdojo.

lwjcjmx123 avatar lwjcjmx123 commented on July 27, 2024

digital ocean +1, I have use digital ocean for years, it stable and cheap enough, and have a independence VPS is convenient, you can do anything you want. and it can scale for config, if the app load have increase, you can Improve configuration easily

from editdojo.

ykdojo avatar ykdojo commented on July 27, 2024

Hmm looks like Digital Ocean is pretty popular, at least among everyone here. Maybe I'll give it a try..

I'm thinking of using either MySQL or PostgreSQL for this project.

from editdojo.

lwjcjmx123 avatar lwjcjmx123 commented on July 27, 2024

the both of MySQL and PostgreSQL is ok, I prefer to use mysql, because I have only used it, hah, but give it a try for PostgreSQL is a good idea too

from editdojo.

verymanley avatar verymanley commented on July 27, 2024

I also have heard good things come of Digital Ocean. It was recommended to me by Isaac Ardis who is an ETC dev member. I lived with him in Hakodate for a couple months..

from editdojo.

ykdojo avatar ykdojo commented on July 27, 2024

Okay thank you! I will probably try using PostgreSQL for this then. Hmm based on that, GCP might be a good option from the cost perspective.

from editdojo.

Stunner avatar Stunner commented on July 27, 2024

I strongly recommend using Docker as it allows you develop in one environment and then deploy it anywhere without fuss. Something you should learn sooner rather than later. I too am fairly new to backend/web dev and am glad I took the time to learn it.

from editdojo.

starlaxy avatar starlaxy commented on July 27, 2024

also take a look at AWS Elastic Beanstalk https://aws.amazon.com/elasticbeanstalk/ it handles deployment n scaling for you. And it doesn't have extra fee, you still pay only for the aws resource you use. c:

from editdojo.

ykdojo avatar ykdojo commented on July 27, 2024

Okay sounds good! We are actually thinking of using Elastic Beanstalk now.

from editdojo.

ykdojo avatar ykdojo commented on July 27, 2024

I've been trying to use AWS Elastic Beanstalk for a few days, but it's actually a huge pain to set up compared to Heroku.

I'm wondering if we should go with Heroku for now just to cut down the set up time at the beginning.

Also @Stunner, thanks for the info. I think I should learn it at some point, too. Dealing with different platforms (AWS and Heroku) has been such a pain...

from editdojo.

utkarshdubey avatar utkarshdubey commented on July 27, 2024

Heroku is nice. Not on the production front but still offers good features. Plus anyone can use it without a credit card. I recommend using it for now so we could at least have a working example but in future use something like Digital Ocean or Docker

from editdojo.

utkarshdubey avatar utkarshdubey commented on July 27, 2024

If you're doing machine learning or other GPU-intensive work, Heroku might not be a great fit. With these lines in order I hope you understand. Also it's less scalable and more costly. It's architecture isn't good for production. Plus it gives you less customization.

from editdojo.

franksierra avatar franksierra commented on July 27, 2024

I will give a +1 on DigitalOcean, i have some production servers hosted there.

from editdojo.

xTEddie avatar xTEddie commented on July 27, 2024

I'd use Docker to containerize the application so that I'll be able to run the app in any environment very quickly without worrying about the configurations once it's set up once. I'd use Digital Ocean to host the app in the end. Personally, I find Digital Ocean more friendly than AWS. It's $5/month for 1GB of Memory and 1 CPU. I'd get SSL certificates for free with Let's Encrypt to have my website running on HTTPS because security first. I have my personal blog https://thetechgeek.io running on Digital Ocean. I also manage my DNS through Digital Ocean.

from editdojo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.