DEV Community

Cover image for a first look at qovery
anthony-campolo
anthony-campolo

Posted on • Updated on

a first look at qovery

Qovery is a CaaS (Container as a Service) platform for deploying fullstack applications to the Cloud with your own account on AWS, GCP, Azure, and Digital Ocean. It syncs to your git repository, detects your Dockerfile, and can integrate with a variety of open source web frameworks.

The code for this article can be found on my GitHub.

Setup Qovery Account

Create a Qovery account at the following link.

Install Qovery CLI

Install instructions will vary depending on whether you are using MacOS, Linux, or Windows. I will be using the MacOS instructions with Homebrew, see this link for other operating systems.

brew tap Qovery/qovery-cli
brew install qovery-cli
Enter fullscreen mode Exit fullscreen mode

Login to Qovery account with qovery auth

qovery auth
Enter fullscreen mode Exit fullscreen mode

This will open your browser and ask for authentication through GitHub or GitLab.

Create project

Start with a blank application and initialize a package.json.

mkdir ajcwebdev-qovery
cd ajcwebdev-qovery
npm init -y
npm i express
touch index.js Dockerfile .dockerignore
echo 'node_modules\n.DS_Store' > .gitignore
Enter fullscreen mode Exit fullscreen mode

index.js

Include the following code inside index.js to return an HTML snippet.

// index.js

const express = require("express")
const app = express()

const PORT = 8080
const HOST = '0.0.0.0'

app.get('/', (req, res) => {
  res.send('<h2>ajcwebdev-qovery</h2>')
})

app.listen(PORT, HOST)
console.log(`Running on http://${HOST}:${PORT}`)
Enter fullscreen mode Exit fullscreen mode

Start up server

Run node index.js to start the server and open localhost:8080.

node index.js
Enter fullscreen mode Exit fullscreen mode

01-ajcwebdev-qovery-localhost-8080

Dockerfile

FROM node:14-alpine
LABEL org.opencontainers.image.source https://github.com/ajcwebdev/ajcwebdev-docker
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm i
COPY . ./
EXPOSE 8080
CMD [ "node", "index.js" ]
Enter fullscreen mode Exit fullscreen mode

.dockerignore

node_modules
Dockerfile
.dockerignore
.git
.gitignore
npm-debug.log
Enter fullscreen mode Exit fullscreen mode

Connect to GitHub repository

git init
git add .
git commit -m "I'd make a qovery joke but I have no idea what the name means"
gh repo create ajcwebdev-qovery
git push -u origin main
Enter fullscreen mode Exit fullscreen mode

Setup Qovery Project

Create a project

02-qovery-projects

Create a new project.

03-create-new-project

Create an environment

04-qovery-environments

Create a new environment called dev.

05-create-new-environment

Create an app

06-qovery-apps

Connect your GitHub repo and set the branch to main.

07-create-application

Application Dashboard

08-express-server-dashboard

Set the port to 8080.

09-set-port-to-8080

Deploy your application with the action button.

10-deploy-action

Click actions and select open to see your running application.

11-deployed-express-server

Check application context with qovery context

The context command lets you configure the CLI to work with your chosen application. Before executing other commands, you need first to set up the context. The context is then remembered and used by the CLI.

qovery context
Enter fullscreen mode Exit fullscreen mode
qovery context
Qovery: Current context:
Context not yet configured. 

Qovery: You can set a new context using 'qovery context set'.
Enter fullscreen mode Exit fullscreen mode

Configure a new context with qovery context set

qovery context set
Enter fullscreen mode Exit fullscreen mode
Qovery: Current context:
Context not yet configured. 

Qovery: Select new context
Organization:
✔ ajcwebdev
Project:
✔ ajcwebdev-first-project
Environment:
✔ dev
Application:
✔ express-server

Qovery: New context:
Organization | ajcwebdev              
Project      | ajcwebdev-first-project
Environment  | dev                    
Application  | express-server
Enter fullscreen mode Exit fullscreen mode

Check your application logs with qovery log

qovery log
Enter fullscreen mode Exit fullscreen mode
TIME                    MESSAGE                         
Sep  9 23:22:26.246670  Running on http://0.0.0.0:8080  
Enter fullscreen mode Exit fullscreen mode

Check the status of your application with qovery status

qovery status
Enter fullscreen mode Exit fullscreen mode
Application    | Status 
express-server | RUNNING
Enter fullscreen mode Exit fullscreen mode

Discussion (5)

Collapse
rophilogene profile image
Romaric P.

Thanks for sharing Anthony

Collapse
ajcwebdev profile image
anthony-campolo Author

No problem, thanks for the great platform 😊. We hope to have a good Redwood tutorial for Qovery in the near future.

Collapse
rophilogene profile image
Romaric P.

I'd love to see what we can do together

Collapse
madilraza profile image
MUHAMMAD ADIL RAZA

Hey Anthony what a Great Peace of Tutorial you are writing .
i want to invite you to My medium Publication to Write your Blogs There and kickstart your Journey There .
medium.com/marsec-developers
this is the Link to our Medium Publication
either you can mail me directly at founder@marsecdev.com
hope to see you soon

Collapse
ajcwebdev profile image
anthony-campolo Author

Thank you Muhammad for the offer. I appreciate the thought, but I don't support publishing platforms that arbitrarily paywall writers content. I also would prefer to publish under my own brand, as my journey was kickstarted long ago.