20
53 Comments

How do you deploy your MVPs?

If you had a MVP ready right now and wanted to publish it, how would you deploy it? Some options, but of course not limited to:

  • Heroku
  • Custom VPS and manual deploy via e.g. SFTP
  • Custom VPS and at least some automation via Ansible, etc.
  • Webhosting provider, e.g. Webfaction of Godaddy
  • Kubernetes/docker

Or some other way perhaps?

I'm a believer in taking the simplest route and therefore nowadays just usually push everything to Heroku to begin with. The small upfront costs really are a small price when you can just get your application live in minutes (+the added benefit of easily bringing in others into the project if needed).

(Currently I'm researching and developing something related to this (a self-hosted thing to help with deploying). If this is an area of interest to you, you can give me your email address here so I can email you a test link soon: http://eepurl.com/dlacXn)

on November 21, 2019
  1. 8

    Render.com, same way I host Indie Hackers. Super simple, super cheap.

    1. 4

      I was about to mention them (render.com) as well. @csallen, would you happen to know if Render allows for usage of custom proxy servers like Rendora (rendora.co)?

      There is another one similar to Render: https://unubo.com/ that I came across on ProductHunt.

      1. 2

        Yes. You can set it up quite easily using Render's Docker support.

        1. 2

          That's great! Thanks for the clarification Anurag! I guess I should start looking at Render seriously now.

    2. 2

      Thanks @csallen for sharing.
      I didn't know about this company. I usually use heroku + netlify + linode.

      Seems I will have to wait till they get bitbucket integrations working.

      1. 1

        Definitely planned. Out of curiosity, what makes you use Bitbucket over GitHub/GitLab?

        1. 2

          Free & unlimited private git repositories + clean UI + per project level team management.

          I have been using it since 2009 with and seems to offer all what I have ever wanted. tried gitlab but I didn't see the reason to switch to it.

    3. 2

      Wow, I've never even heard of this company but it looks awesome!

    4. 2

      This comment was deleted 5 years ago

      1. 1

        it's a gatsby site, so the answer is probably SSR with a very good CDN

        1. 1

          (Render founder here) Exactly. Gatsby is really great for content-driven sites.

  2. 5

    I use zeit.co for everything and generally use a hosted db like firebase. Works great if you backend logic runs well on serverless functions.

  3. 3

    +1 For render.com . You don't even need to think about deployment pipelines, infrastructure set up at all, which really shouldn't be a consideration until you have established your PMF and actually to start building the proper infrastructure. I had an elixir cluster up and running < 30 minutes with a database connected. Super simple stuff

  4. 2

    I had a desktop software which I shutdown last year. It was made with Java Swing and used a custom made licensing server which I deployed on the cheapest DigitalOcean. I used Letsencrypt for ssl.

    Currently I am working on a webapp with VueJS, because its client side rendered, I use Netlify for the UI and google cloud for backend api. The APIs are written in SpringBoot and connects to mysql and Kafka which is also deployed in google cloud as docker containers. I am willing to give render.com but not sure if I can run a JVM. @anuragg ?

    1. 2

      If your SpringBoot application is containerized you can switch it over to Render as-is. Here's an example for a containerized MySQL: https://render.com/docs/deploy-mysql.

    1. 2

      This comment was deleted 6 years ago

  5. 2

    I just deploy to Firebase hosting via the Firebase CLI https://firebase.google.com/docs/hosting/

    I would like to set up some sort of CI/CD but I should probably focus on finishing the MVP

    1. 2

      Same here! So far I've really enjoyed the built-in features of Firebase and how easy it is to deploy from the CLI. Besides hosting, I also make use of Firestore, Cloud Functions, Authentication and Analytics.

      I don't have a lot of experience with other similar solutions but, currently, I don't have a clear reason to try anything else.

      1. 1

        I just got an email from https://buddy.works/ they seems to have a comprehensive setup for deploying from source control to the usual hosting providers

        https://buddy.works/actions

  6. 2

    We have a lot of web apps for our own projects as well as for our paying clients.

    They’re all on very similar stacks. Backend web api is built in python and hosted on AWS lambda + API gateway. Front end in ReactJS. DynamoDB as the database. Deployment happens to AWS via a single deployment script.

    1. 1

      Curious, do you write your apis using a different lambda for each endpoint, or do you use something like flask to route to each of your endpoints inside of the lambda?

      1. 1

        We bunch our endpoints into a single lambda function. We do this not only for web APIs but also for our data pipelines as well (multiple functions inside the same Lambda monitoring different S3 buckets).

        I have been thinking about how I would add the ability to parse the different endpoints in app.py and turn that into multiple Lambda functions at deployment time. That would make things complex, but give us the ability to deploy smaller lambda functions.

        1. 1

          Yeah, there are definitely trade-offs... one lambda will be larger and give you longer cold starts, but on the plus side, it's the same lambda being hit so it will stay warm longer.

          I'm mostly a node developer but I've found that decoupling your lambdas after the fact is much harder than starting with separate functions because they share code at that point... To keep things separate you need to be religious about not importing files from other lambdas. but deploying them separately shouldn't be more than just separating your endpoints into their own files and using serverless/api-gateway to do the routing.

          1. 2

            I hear you on doing it early. I would want to build it into my framework so I am forced to keep them separate from the beginning.

            This framework does it pretty well, IMO:
            https://rubyonjets.com/docs/routing/

            They parse the routes.rb file and use that to create separate API gateway endpoints as well as deploying separate lambda functions.

            I would love to borrow that idea and make it part of my framework.

  7. 2

    If it has a backend I put it on Digital Ocean and I just SSH into it and git pull. No complicated setups for a MVPs...

    If it's all static I use Netlify (I can highly recommend this option when you can!)

    1. 1

      Depends on the project, but I find that this gets cumbersome after doing lots of manual deploys (10+). At least when using e.g. nodejs where you need to manage and restart individual processes. Also easy to forget what commands exactly to run, if there's a pause in development. Granted, for something like PHP you can just pull (+ maybe run migrations), and it goes live instantly; a bit easier.

      1. 1

        What I’ve been doing with Fosh is:
        push to GitLab -> CI builds docker image -> CI pushes image to registry (as latest when built from master) -> droplet with docker compose pulls and automatically restarts container with latest image

        You can get the auto updating docker compose pretty easily with watchtower

      2. 1

        Why not use something like Ansible to automate it a bit? You just write playbooks (a bunch of commands sent over SSH) and then it runs them all for you. There’s no extra infrastructure or anything; I run it from my laptop. It’s made provisioning servers and deploying way easier for me.

        1. 1

          Sure, that's actually how I've deployed my SaaS for almost 4 years now. I absolutely love Ansible, I use it for server provisioning and automated tasks on remote hosts. My above comment is in response to Tim's comment which I understood as running commands like git pull manually. For which use case, Ansible is IMO the perfect follow-up tool because it's similar in mentality to running a sequence of commands.

    2. 1

      This comment was deleted 5 years ago

      1. 1

        Have you had any trouble setting up e.g. persistent data or logging with kubernetes?

        How about local development, do you also use kubernetes there?

        1. 1

          This comment was deleted 5 years ago

  8. 2

    Netlify for the frontend and DigitalOcean for the backend. Most of the servers are just $5/mo, although my app does video encoding so I have to spring for the beefier $40/mo server to do that. DigitalOcean also offers managed PostgreSQL, Redis and S3-compatible object storage, which I use as well. I manage everything with a small Terraform file and a few Ansible playbooks.

    I took Marco Arment’s advice (https://marco.org/2014/03/27/web-hosting-for-app-developers) about not using proprietary services to heart and this is where I ended up. I also want to avoid giving money to giant megacorps like Amazon as much as possible. It takes a little more elbow grease to get things working, but it’s pretty satisfying too!

    1. 1

      I also do feel uneasy about vendor locking myself to service providers.

      My perspective has changed a lot after having ran a SaaS for almost 4 years now, on a custom DigitalOcean+Ansible setup. Even with 95% of the stuff automated, I still wish I had just pushed the project to Heroku initially. Contemplating doing that every time I nowadays have to manually address some outage, networking, etc.

      Deploying to some known platform also reduces the time needed to onboard new devs, if the project ever grows to that point.

      Still, I'll admit I can't completely shake off the vendor lock-in fright from my head.

      1. 1

        This comment was deleted 6 years ago

  9. 1

    I use Piku on a VPS.

    All my apps, and a couple of customer sites, are running on a single $5 Digital Ocean box. Piku automates git push deploys, including provisioning an SSL certificate. I have Python/Django, Nodejs, and static sites up on it, and some use a PostgreSQL database.

    For me Piku has meant going from hours setting up deployment (Using custom Ansible scripts) to seconds instead. It's a dream.

  10. 1

    We have a boilerplate template that we actively maintain for our own products as well as for client work.

    • Backend API in python, hosted on AWS Lambda
    • API gateway as a web server
    • AWS Cognito for authentication and authorization
    • DynamoDB as the database
    • Route53 for DNS
    • Front end in React
    • Code in Github with Github Workflows for running tests and deployment
    • Dev works locally, but also allows deployment via a single command line script
  11. 1

    I'm into the serverless model, personally.

    just sls deploy and you're off the to races... but it takes a very specific development model.

    1. 1

      But for your front end, if it's static, I would go with an S3 site. It's pretty cheap.

  12. 1

    I use https://serverless.com/ for backend work and https://app.netlify.com for my frontend. all done with local pushes or deploys. Too early for CI

  13. 1

    https://albumdaily.com is deployed to Netlify that simply pulls from a Github repo. It is so easy and simple that it's scary.

  14. 1

    For the last 2 MVPs this was my deployment

    1. All Backends(Nodejs) in Heroku
    2. Frontend - Netlify if its a fully static
    3. Linode VPS - if it has PHP in it

    For the next one - I am evaluating a couple of other deployment strategies and platforms especially to replace heroku. :)

  15. 1

    I'm using a small digital ocean box and have set up GitLab CI/CD to

    • build the project and get all the dependencies
    • connect to my digital ocean droplet via SSH
    • copy the project files to digital ocean
    • run post-deployment scripts on digital ocean (cache clears etc)

    As my projects are small it would be easy to connect to the box each time and pull the code manually but I like that everything after "git push" is handled automatically for me.

    1. 1

      Sounds good, I think even in simple git pull deploy scenarios automating the deploy saves tons of frustration in the long run.

      I didn't know GitLab CI can do all that. Do you self-host GitLab?

      1. 1

        No, I'm just using their hosted stuff and I'm on their free tier so far. I'm happy to send you over my .gitlab-ci.yml file if you're interested.

  16. 1

    Bash script on my VPS which does git pull, cache purge + warmup and some other stuff. Oldschool af I know!

    1. 1

      Have you hooked up this script to be ran automatically when you push to master?

      Also, any efforts towards zero-downtime during the deployment? Depends on project of course, but e.g. building assets or starting processes in the background and switching after the new deployment is ready.

      1. 1

        I call the VPS script via alias in my local terminal.

        It builds the project (including DB migrations and other stuff) in project--build directory and then moves (renames) project to project--rollback and project--build to project in one atomic operation so there is almost no downtime which for MVP is fine with me.

  17. 1

    I'm currently working on my MVP so here it goes:

    Everything is serverless on AWS (Lambda, S3, DynamoDB, Stepfunctions, CloudFront) managed with Infrastructure as Code namely AWS CDK (a Layer on top of cloudformation, you write typescript instead of YAML). Deployment is manual, no CI/CD yet. I'm probably gonna choose GitHub actions or AWS Code Build.

    I love the pay only for what you use from serverless, but local development can be a bit of a pain.

    1. 1

      Could you elaborate on how local development can be a pain? I believe it probably is, would just like to hear examples.

      Do you develop individual pieces and just write tests for those, or do you in some way spin up all the services locally as well so they communicate with each other?

      1. 1

        there are ways to host parts of the aws infrastructure locally e.g. locakstack AWS SAM and the serverless framework supports it aswell. I used AWS SAM in the past a bit, but it was very rudimentary.

        One of my workloads is an upload to an S3 bucket triggers a step function, which was not supportet. So everytime I have to wait 2minutes to test the change, which is pretty annoying :D

        I will try localstack and see how that works out.

        As much was I enjoy serverless, I wouldn't recommend it if you just want to get shit done, rails + postgres on heroku is gonna be so much better

  18. 1

    As of now, probably Docker + AWS. My app is gearing up to be back-end heavy (two different types of databases + Python) and the frontend is ReactJS that likely has authentication with Firebase. Open to suggestions though - I'm trying my best to keep my expenses to the minimum.

    1. 1

      Have you considered trying it out first on a managed platform, like Heroku or Render? Typically any project I've deployed on Heroku, with 1-3 dependencies like Postgres, S3, etc. cost maybe $25/mo at max, with the lowest tiers of pricing. I find that a reasonable price for having not to worry about anything devops-related really, and spending all my time on the project itself.

      1. 1

        That's a good point. I'll honestly probably start with a managed platform and see how the first month or two turn out with the product. I've got some devops experience (Docker, AWS EC2, etc.) but that may be more work than its worth for the initial launch. I think my biggest concern is expenses, but you're right in that $25/month is actually reasonable for what they do for you. Thanks for this!

  19. 1

    Hi! Though i'm not really MVP-ready one thing I did early on was get my deployment pipeline down. Though its probably a little messy... its cheap and functions although it took some trial and error! That way I can have new features live in a matter of minutes for myself and what few family and friends I have trying my app.

    I use Heroku's generous free-tier for the backend and DB. It detects commits and triggers a build automatically. I was surprised how easy it was to set up, compared to my previous attempts at Docker-izing the whole thing and trying to get it running on AWS. It does go to sleep after a period of inactivity, but at the point I'm at right now I think thats perfectly acceptable.

    For the front-end I initially was using Buddy, but as the app grew and so did my build requirements (SASS was the straw that broke that camel's back) Buddy's costs just didn't make sense for the phase I was in. So now I use bitbucket's pipelines, which builds and sends my SPA app to my host.

    Total Cost: $0 (not including domain name and hosting which I already pay for my other websites)

    Downsides: I only have my local development environment, and Production. So sometimes I push a change and might break something. So I could definitely benefit from a Staging environment with a manual push to production; though more unit and e2e tests would help mitigate that too. Might be other negatives that I haven't ran into yet.

    I'm not a DevOps guy, so this stuff is something I struggle with, especially when I was trying AWS. I was always worried that i'd mess up a config and end up with a massive bill.

    1. 1

      I find that DigitalOcean is much clearer in regards to costs, than AWS (really prefer DO over AWS unless I need something AWS specific).

      What is Buddy? Some paid platform for the front-end?

      1. 1

        That's true, I briefly looked at DO when I was exploring kubernetes but it was new to them at the time. I should give DO another look soon.

        https://buddy.works/ is a CI/CD. I found their interface very clean and was easy to set up.

  20. 1

    This comment was deleted 6 years ago