Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
September 10, 2021 07:49 am GMT

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.

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-clibrew install qovery-cli

Login to Qovery account with qovery auth

qovery auth

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-qoverycd ajcwebdev-qoverynpm init -ynpm i expresstouch index.js Dockerfile .dockerignoreecho 'node_modules
.DS_Store'
> .gitignore

index.js

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

// index.jsconst express = require("express")const app = express()const PORT = 8080const 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}`)

Start up server

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

node index.js

01-ajcwebdev-qovery-localhost-8080

Dockerfile

FROM node:14-alpineLABEL org.opencontainers.image.source https://github.com/ajcwebdev/ajcwebdev-dockerWORKDIR /usr/src/appCOPY package*.json ./RUN npm iCOPY . ./EXPOSE 8080CMD [ "node", "index.js" ]

.dockerignore

node_modulesDockerfile.dockerignore.git.gitignorenpm-debug.log

Connect to GitHub repository

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

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
qovery contextQovery: Current context:Context not yet configured. Qovery: You can set a new context using 'qovery context set'.

Configure a new context with qovery context set

qovery context set
Qovery: Current context:Context not yet configured. Qovery: Select new contextOrganization: ajcwebdevProject: ajcwebdev-first-projectEnvironment: devApplication: express-serverQovery: New context:Organization | ajcwebdev              Project      | ajcwebdev-first-projectEnvironment  | dev                    Application  | express-server

Check your application logs with qovery log

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

Check the status of your application with qovery status

qovery status
Application    | Status express-server | RUNNING

Original Link: https://dev.to/ajcwebdev/a-first-look-at-qovery-4897

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To