All my prayers have been answered once I found Qovery. It's a super affordable hosting service that is amazingly powerful and gives you maximized ease.
If you are still clinging to Heroku, Netlify, Terraform, etc; consider reading these articles.
Okay, so that being said, I will show you how to deploy a nodeJS and python application to Qovery in less than five minutes.
I'm assuming you've already signed up for Qovery, developed your app, and put all the code into a github repository. Those are the main steps you need to do and the rest is a breeze.
The next step is to create a file called
Dockerfile in your application. Assuming you are deploying an expressJS app, your dockerfile should look like this:
FROM node:14 RUN mkdir -p /usr/src/app WORKDIR /usr/src/app COPY . . RUN npm install EXPOSE 3000 CMD ["node", "index.js"]
Also, you don't even need to have docker installed. Qovery takes care of all that for you.
After that, push to the git repo and update it. Next, you're going to want to create a new project on your qovery console.
Next, create an environment in that project.
Add your first app, connect to the correct git repo, and finally, a very important step, set the build mode to Docker, and set the port to 3000.
You can technically use a different port to add your app on, but in this tutorial, let's use 3000. Make sure your app is listening on that port!!
If you want to change that port, make sure you change the code in your dockerfile, the
EXPOSE 3000 to
Sign up for qovery, create your project, and then link it to a github repo. Add your dockerfile into your app. It should look like this:
FROM python:3.8-slim-buster WORKDIR /usr/src/app COPY . ./ RUN pip install -r requirements.txt EXPOSE 3000 CMD ["python","app.py"]
Make sure your app is listening on port 3000. You don't need to install docker.
Push your code to the git repo, create a new project, a new environment, and then an app. Make sure the build mode is Docker and not Buildpacks.
Click the Actions button, deploy your project, and you should be ready to go.
I hope qovery is something you'll be enjoying from now on. It is something that is super amazing, secure, and reliable.
Don't forget to follow the Founder of Qovery on DEV!
Happy Coding (and deploying)!