Application

An application is part of a Project within an Environment and is a container unit. Multiple applications can be part of the same Environment, be connected to a set of dependencies (databases and other services), and can communicate with other applications within the same Environment.

Create an Application

Configuration

General

General settings allow you to set up your application name, git repository and build mode.

Git Repository

  • Configure your repository URL (it can be hosted on GitHub, GitLab or Bitbucket).
  • Select branch that Qovery should use for builds in this environment
  • Select Root Application Path - base folder in which the application resides in your repository

CPU

Build Mode

Option 1: Buildpacks

To simplify the application build for the developer, Qovery supports Buildpacks out of the box. Buildpacks determine the build process for an app and which assets and runtimes should be made available to your code at runtime. If your complex apps are running multiple languages, you can also use multiple buildpacks within a single app. Meaning, as a developer, you don't need to write a Dockerfile to build and run your app. Qovery Buildpacks takes care of everything for you.

Supported languages

languageversion
Node.JSany
Clojureany
Pythonany
Javaany
Gradleany
JVMany
Grailsany
Scalaany
Playany
PHPany
Goany

You don't find a cool language? Suggest us to support it

Option 2: Dockerfile

Qovery runs your application within the Container technology. To build and run your application, you need to provide a valid Dockerfile.

Valid NodeJS Dockerfile
FROM node:13-alpine
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY . .
RUN npm install
EXPOSE 3000
CMD node ./bin/www

After creating a Dockerfile, specify the location of your Dockerfile in Dockefile path field.

Dockerfile

Configuration from above will make Qovery look for the Dockerfile in /timescale/Dockerfile path of your repository (Root Application Path + Dockerfile Path).

Resources

CPU

To configure the number of CPUs that your app needs, adjust the setting in the Resources section of the application configuration.

CPU

RAM

To configure the amount of RAM that your app needs, adjust the setting in Resources section of the application configuration.

RAM

Auto-scaling

Application auto-scaling is based on real-time CPU consumption. When your app goes above 60% of CPU consumption for 5 minutes, your app will be auto-scaled and more instances will be added. It is transparent. You can adjust the minimum and maximum of instances you need in your application settings. Qovery runs your application on Kubernetes and relies on metrics-server service to auto-scale your app.

Dependencies

Qovery gives you the power to have multiple apps within one environment. Sometimes it's necessary to one or multiple apps before others. By using the Dependency configuration, you can declare a list of apps your app is depending on.

Application Dependencies

Setting up application dependencies will make sure all the dependencies are running before your application starts.

Storage

Block Storage

The default filesystem for applications running on Qovery is ephemeral. Application data isn’t persisted across deploys and restarts, which works just fine for most apps because they use managed databases to persist data.

However, many applications need persistent disk storage that isn’t ephemeral. These include:

  • Blogging platforms and CMSs like WordPress, Ghost, and Strapi.
  • Collaboration apps like Mattermost, GitLab, and Discourse.

This is where Qovery block Storage comes in. Qovery applications can use storage to store data that persists across deploys and restarts, making it easy to deploy stateful applications.

Use cases
✅ Good use cases
  • For I/O intensive applications (E.g. database)
  • To store temporary files
❌ Bad use cases
  • To store file > 1 TB
  • To expose files from an application (E.g. images)
Types of Block Storage

Qovery Storage supports:

TypeMax IOPSMax ThroughputMin SizeMax SizeUse cases
fast_ssd640001GB/s5GB10GB Community / 1TB paid plansCritical business applications that require sustained IOPS like databases
Configuration

You can set up your Block Storage in Storage section of your application configuration.

Application Storage

Ports

Most of the application needs to be accessed by other services inside or outside of your environment. To set up the access, declare the ports your application uses. Internal ports are available internally inside your environment for other services to use. You can also expose ports publicly - it makes them accessible over the public network.

Application Ports

Exposing Applications

Before your application is exposed to the internet, Qovery needs to know what PORT to listen on to expose your app. Qovery does try to do it's best to do this automatically for you however, there are cases when we can't.

You can configure your application to use the PORT environment variable by adding the PORT on your application env variables page.

Domains

Domain section of your application configuration allows you to define a custom domain for your application.

Application Domains

After setting up a custom domain, you'll see a Value that you need to set up as a CNAME record in your domain registrar.

Setting up the CNAME on the domain provider side will make your app accessible through your custom domain on Qovery.

Database

To access a database managed by Qovery from your application, you can use the BUILT_IN environment variables and secrets that have been automatically created by Qovery during the database creation process. You can find all the BUILT_IN variables on the Qovery console within the Environment Variable section of your application (see the credentials and connectivity section for the full list).

In order to match the naming convention of the database connection variables used in your code, you can create an alias for each variable in the Qovery console so that you don't need to change your code.

Once you have defined an alias for each variable, you can redeploy the application and check that it has finally access to the database.

Example

You have created a postgres database on the Qovery console. Within the code of your application you need some environment variables containing the connection parameters of the database: DATABASE_URL, DATABASE_USER, DATABASE_PASSWORD, DATABASE_PORT, DATABASE_NAME

example.py
DB_NAME = os.getenv("DATABASE_NAME", "nemo")
DB_USER = os.getenv("DATABASE_USER", "nemo")
DB_PASSWORD = os.getenv("DATABASE_PASSWORD", "password")
DB_HOST = os.getenv("DATABASE_HOST", "localhost")
DB_PORT = os.getenv("DATABASE_PORT", "5432")

To match your internal naming convention, you can create aliases for each of the corresponding variables in this way:

Env Var Aliases

Persistent sessions

A user of your application will be redirected by the load balancer to the same instance each time he accesses to it.

Sticky session

Environment Variable

To learn how to set up environment variables in your projects and applications, navigate to configuring Environment Variables section.

Secrets

To learn how to set up secrets in your projects and applications, navigate to configuring Secrets section.

Logs

To learn how to display your application logs, navigate to logs section in our Debugging guide

SSH

To connect to your application via SSH, please use the via the Qovery SSH command available on our CLI.

Update and Rollback

  1. Navigate to Console.

  2. Choose your application

  3. In the application overview, click on the Actions button and Rollback and Update.

    Application

  4. Once you click, this panel will appear, and you will be able to choose the version you wish to update/rollback.

    Application

Delete an Application

  1. Navigate to Console

  2. Choose your application

  3. In the application overview, click on the Actions button and remove the application.

    Application