Live data from Hacker News

How to set up continuous deployment using free hosted tools

simonwillison.net

41–50 of 92 posts

Re: How to set up continuous deployment using free hosted tools

#42
Heroku is awesome for this use case, but there are also great alternatives based on Cloud Foundry. Cloud Foundry is an open source PaaS with support for Heroku buildpacks + docker containers. At a median of ~5€/GB RAM per month they will also be a bit cheaper than Heroku.

Some providers that offer Cloud Foundry including a free tier for small Apps:

- Meshcloud (hosted in Germany, 2 Locations) https://panel.meshcloud.io/#/register (Disclaimer: I'm a founder there)

- Pivotal Web Services (hosted on AWS US): https://run.pivotal.io/

- IBM Bluemix https://www.ibm.com/cloud-computing/bluemix/ (various locations, a bit more expensive than the other two though)

Re: How to set up continuous deployment using free hosted tools

#43

> Once you’ve set up Travis, it will automatically test every commit to every branch Small correction: It will automatically test the latest commit on every push to every branch

You can manually test all commits in push though. Or automatically run bisect on failure, etc.

Re: How to set up continuous deployment using free hosted tools

#44

Does anyone have a solution for a situation where I have a Django backend and a VueJS front end and want to run the Vue build step before deploying? Currently doing this with Git hooks and committing the resultant build, but that is bad for a number of reasons. This is running on Heroku. Would their release phase allow for this without significantly slowing things down? Would it deal with npm installs?

We have this with GitLab CI, although with React and not Vue (but I don't think this matters). We have two stages, `build-assets` and `build-app`, first one runs Webpack etc, and the second one copies the build artifacts into a Docker image with Django and finalizes the image with collectstatic.

We're using Docker, but I'm sure the same approach can be used with simple tarballs, OS packages (.debs, etc) or deploy-specific git repo (for Heroku)

Re: How to set up continuous deployment using free hosted tools

#45
Once you need something a bit more heavyweight than Travis (e.g. more CPU) I would highly suggest Buildkite (https://www.buildkite.com). It’s a “bring your own machines” solution, which means you can have beefy machines (e.g. via buildkite on EC2 spot autoscaling), or even machines that run inside production without handing buildkite itself any secrets. We’ve been using it at Ladder and it’s been phenomenal.

Also it has a lot of emojis.

Re: How to set up continuous deployment using free hosted tools

#48

Does anyone have a solution for a situation where I have a Django backend and a VueJS front end and want to run the Vue build step before deploying? Currently doing this with Git hooks and committing the resultant build, but that is bad for a number of reasons. This is running on Heroku. Would their release phase allow for this without significantly slowing things down? Would it deal with npm installs?

You do not need to commit your build to git if you are using heroku.

If you add the nodejs buildpack to your heroku project, it should detect and build your package.json automatically on heroku. Works with both yarn and npm.

You just need to make sure to set NODE_ENV=production in your heroku config.

https://devcenter.heroku.com/articles/nodejs-support#build-b...

Re: How to set up continuous deployment using free hosted tools

#49

I'm the developer advocate for Codeship. Codeship ( https://codeship.com/features ) allows forever free builds for public repos. It has support for both Continuous Integration and Delivery/Deployment. Maybe you can give it a spin as well?

I can second codeship - even though its a bit more clunky than Travis and with less integrations and command-line tools, its has way beefier machines, easily several times faster than what travis offers even to paid customers. And their tools are improving. Keep up the good work.

Re: How to set up continuous deployment using free hosted tools

#50

Does anyone have a solution for a situation where I have a Django backend and a VueJS front end and want to run the Vue build step before deploying? Currently doing this with Git hooks and committing the resultant build, but that is bad for a number of reasons. This is running on Heroku. Would their release phase allow for this without significantly slowing things down? Would it deal with npm installs?

You might be able to solve this using a bin/post_compile script - most standard Heroku buildpacks will run these as part of the build step, and they can be used to run commands that generate files which will then be included in the compiled app that gets deployed to Heroku.

Here's an example that might be useful: https://github.com/nigma/heroku-django-cookbook/blob/master/...

Post reply on HN