diff --git a/website/docs/using-qovery/configuration/application.md b/website/docs/using-qovery/configuration/application.md index 9ab0a48403..5fd851de3b 100644 --- a/website/docs/using-qovery/configuration/application.md +++ b/website/docs/using-qovery/configuration/application.md @@ -1,5 +1,5 @@ --- -last_modified_on: "2023-06-12" +last_modified_on: "2023-07-07" title: "Application" description: "Learn how to configure your Application on Qovery" --- @@ -340,22 +340,23 @@ Storage can be added only if the application has never been deployed before AND Within this section you can define the port exposed by your application to the other services or even over the internet. You can edit the existing ports or declare new ones by specifying: -- Application port: this is the port exposed internally by your application for the other services. Kubernetes will use this port to verify the readiness and liveness of your application via regular probes. +- Application port: this is the port exposed internally by your application for the other services. - Publicly exposed: it allows you to expose over the public network your service. A public domain will be assigned to your application during the deployment (see [Domain section][docs.using-qovery.configuration.application#domains]) -- External port: it is the port that can be used to access this service over the internet (when exposed publicly). Today we support only the HTTPS and Websocket protocols (on the 443 port) +- If Publicly Exposed is selected: + - Protocol: you can select the protocol used by your application : HTTP (for both standard HTTP or websocket communications), gRPC + - External port: it is the port that can be used to access this service over the internet (when exposed publicly). Today we can only expose the service over the port 443 (default HTTP port) and cannot be changed. + - Port Name: it is the name assigned to the port. When multiple ports are exposed publicly, its value is used to route the traffic to the right port based on the called subdomain (which will contain the port name value). Since each port is exposed on the port 443, having a different subdomain is the only way to have multiple ports exposed over the internet. If not set, the default value is `p` (see [Domain section][docs.using-qovery.configuration.application#domains] for more information)

Application Ports

- -Qovery determines the readiness of your service based on the availability of the declared port. If your application does not open this port within 10 minutes, the associated container will be shut down - -#### Exposing Applications -Please take note of the following information: -- You can configure your application to use the **PORT** environment variable by adding the **PORT** on your application env variables page. +#### Important Informations + +- Most of the Kubernetes Health Checks][docs.using-qovery.configuration.service-health-checks] are based on the port declared in this section. Make sure you declare the right port and that you configure the health checks properly. - Connections on public ports are automatically closed after 60 seconds. If you want to implement long living connection (like for websockets) please make sure to use the rigth ingress timeouts in the [advanced settings section][docs.using-qovery.configuration.advanced-settings#network-settings] +- You can configure your application to use the **PORT** environment variable by adding the **PORT** on your application env variables page. - A Note on Listening IPs: It's best for your application to listen on `0.0.0.0:$PORT`. While most things work with `127.0.0.1` and `localhost`, some do not (NodeJS for example) ### Health Checks @@ -364,58 +365,64 @@ To know more about how to configure your Liveness and Readiness probes, have a l ### Domains -`Domain` section of your application configuration allows you to define a custom domain for your application. By default a domain is assigned to your application if a port has been set to be publicly exposed. This assigned domain will have the following pattern: `z-z-gtw.` , where: -- SERVICE_ID : is the first 8 letters of the id of your service -- ROUTER_ID : it is an internal id to identify the router (nginx configuration) of your application -- ASSIGNED_CLUSTER_DOMAIN: it is the domain assigned to your cluster. Any service deployed on this cluster will have the same assigned_cluster_domain +The `Domain` section allows you to define a custom domain for your application. + +For each port publicly exposed, a domain is automatically assigned by Qovery to your application. Qovery will manage for you the networking and the TLS configuration for these domains. -domain example: `zdf72de72-z709e1a88-gtw.za8ad0657.bool.sh` +domain example: `p80-zdf72de72-z709e1a88-gtw.za8ad0657.bool.sh` -**Special Case - Preview Environment**: if the preview environment feature is activated, the created services will have an additional friendly domain following this format `prId-srvName-envSourceName.cluster_domain` where: +**Special Case - Preview Environment** +For each port exposed publicly, an additional domain will be created with the following pattern `portName-prId-srvName-envSourceName.cluster_domain`: +- portName: is the port name, as explained above - prID: is the id of the PR that has generated the preview environment - srvName: is the name of the service - envSourceName: is the name of the blueprint environment that has created the current preview environment -domain example: `123-frontend-blueprint.za8ad0657.bool.sh` +domain example: `p80-123-frontend-blueprint.za8ad0657.bool.sh` + +Note: +- each service deployed on the same cluster will have the same root domain assigned (example: `za8ad0657.bool.sh`) +- the first characters of the domain assigned to the application is based on the portName given to the port (See the [port section](#ports) +- a default domain (without the portName) is assigned to the `default port`(See the [port section](#ports)). Example `zdf72de72-z709e1a88-gtw.za8ad0657.bool.sh` -If you want to customize the url assigned to your application press the `Add Domain` button. +If you want to customize the domain assigned to your application press the `Add Domain` button.

Application Domains

+In this section, you can assign your custom domain via CNAME or just change the sub-domain assigned to your service. + -This configuration is removed every time the environment is cloned in order to avoid domain collision. +This configuration will be **automatically removed** on every cloned environment or preview environment in order to avoid domain collision. -You can use this section to either assign a specific sub-domain or either assign a completely new domain via a CNAME. - -#### Configuring a custom sub-domain -You can specify a custom sub-domain as long as it belongs to the assigned cluster domain (see above). -Example: -- your current domain is zdf72de71-z709e1a85-gtw.za8ad0659.bool.sh (so your assigned cluster domain is `za8ad0659.bool.sh`) -- you can enter a new custom domain `myfrontend-za8ad0659.bool.sh` (since it is a subdomain of the cluster domain) +#### Configuring a domain via CNAME -The application will now be accessible from both the default and the new custom domain +You can configure your DNS by adding a `CNAME` record so that your app will be accessible through your custom domain. Qovery will handle for you the network configuration and the TLS certificate. -Qovery does not check collision in the domain declaration. make sure you assign a subdomain that +[We prepared a guide and video tutorial that explains how to set up your custom domain.][guides.getting-started.setting-custom-domain] -#### Configuring a domain via CNAME -After setting up your custom domain, you'll see a `Value` that you need to set up as a `CNAME` record in your domain registrar. +#### Change the assigned sub-domain +You can specify a different sub-domain for your application as long as it belongs to the assigned cluster domain (see above). +Example: +- your current domain is zdf72de71-z709e1a85-gtw.za8ad0659.bool.sh (so your assigned cluster domain is `za8ad0659.bool.sh`) +- you can enter a new custom domain `myfrontend.za8ad0659.bool.sh` (since it is a subdomain of the cluster domain) + +The application will now be accessible from both the default and the new custom domain. -[We prepared a guide and video tutorial that explains how to set up your custom domain.][guides.getting-started.setting-custom-domain] +Qovery does not check collision in the domain declaration. Make sure you assign a unique subdomain within your cluster. -Setting up the `CNAME` on the domain provider side will make your app accessible through your custom domain on Qovery. The app will still be accessible through the default assigned domain. ## Connecting to a database To know how to access your database from your application, [have a look at the database section][docs.using-qovery.configuration.environment-variable#connecting-to-a-database]. @@ -475,6 +482,7 @@ In the application overview, click on the `3 dots` button and remove the applica [docs.using-qovery.configuration.organization.container-registry]: /docs/using-qovery/configuration/organization/container-registry/ [docs.using-qovery.configuration.organization.git-repository-access]: /docs/using-qovery/configuration/organization/git-repository-access/ [docs.using-qovery.configuration.project]: /docs/using-qovery/configuration/project/ +[docs.using-qovery.configuration.service-health-checks]: /docs/using-qovery/configuration/service-health-checks/ [docs.using-qovery.deployment.logs#live-logs]: /docs/using-qovery/deployment/logs/#live-logs [docs.using-qovery.deployment]: /docs/using-qovery/deployment/ [docs.using-qovery.interface.cli]: /docs/using-qovery/interface/cli/ diff --git a/website/docs/using-qovery/configuration/application.md.erb b/website/docs/using-qovery/configuration/application.md.erb index 2cc93ddc5a..4bedd7c6c0 100644 --- a/website/docs/using-qovery/configuration/application.md.erb +++ b/website/docs/using-qovery/configuration/application.md.erb @@ -328,22 +328,23 @@ Storage can be added only if the application has never been deployed before AND Within this section you can define the port exposed by your application to the other services or even over the internet. You can edit the existing ports or declare new ones by specifying: -- Application port: this is the port exposed internally by your application for the other services. Kubernetes will use this port to verify the readiness and liveness of your application via regular probes. +- Application port: this is the port exposed internally by your application for the other services. - Publicly exposed: it allows you to expose over the public network your service. A public domain will be assigned to your application during the deployment (see [Domain section][docs.using-qovery.configuration.application#domains]) -- External port: it is the port that can be used to access this service over the internet (when exposed publicly). Today we support only the HTTPS and Websocket protocols (on the 443 port) +- If Publicly Exposed is selected: + - Protocol: you can select the protocol used by your application : HTTP (for both standard HTTP or websocket communications), gRPC + - External port: it is the port that can be used to access this service over the internet (when exposed publicly). Today we can only expose the service over the port 443 (default HTTP port) and cannot be changed. + - Port Name: it is the name assigned to the port. When multiple ports are exposed publicly, its value is used to route the traffic to the right port based on the called subdomain (which will contain the port name value). Since each port is exposed on the port 443, having a different subdomain is the only way to have multiple ports exposed over the internet. If not set, the default value is `p` (see [Domain section][docs.using-qovery.configuration.application#domains] for more information)

Application Ports

- -Qovery determines the readiness of your service based on the availability of the declared port. If your application does not open this port within 10 minutes, the associated container will be shut down - -#### Exposing Applications -Please take note of the following information: -- You can configure your application to use the **PORT** environment variable by adding the **PORT** on your application env variables page. +#### Important Informations + +- Most of the Kubernetes Health Checks][docs.using-qovery.configuration.service-health-checks] are based on the port declared in this section. Make sure you declare the right port and that you configure the health checks properly. - Connections on public ports are automatically closed after 60 seconds. If you want to implement long living connection (like for websockets) please make sure to use the rigth ingress timeouts in the [advanced settings section][docs.using-qovery.configuration.advanced-settings#network-settings] +- You can configure your application to use the **PORT** environment variable by adding the **PORT** on your application env variables page. - A Note on Listening IPs: It's best for your application to listen on `0.0.0.0:$PORT`. While most things work with `127.0.0.1` and `localhost`, some do not (NodeJS for example) ### Health Checks @@ -352,58 +353,64 @@ To know more about how to configure your Liveness and Readiness probes, have a l ### Domains -`Domain` section of your application configuration allows you to define a custom domain for your application. By default a domain is assigned to your application if a port has been set to be publicly exposed. This assigned domain will have the following pattern: `z-z-gtw.` , where: -- SERVICE_ID : is the first 8 letters of the id of your service -- ROUTER_ID : it is an internal id to identify the router (nginx configuration) of your application -- ASSIGNED_CLUSTER_DOMAIN: it is the domain assigned to your cluster. Any service deployed on this cluster will have the same assigned_cluster_domain +The `Domain` section allows you to define a custom domain for your application. + +For each port publicly exposed, a domain is automatically assigned by Qovery to your application. Qovery will manage for you the networking and the TLS configuration for these domains. -domain example: `zdf72de72-z709e1a88-gtw.za8ad0657.bool.sh` +domain example: `p80-zdf72de72-z709e1a88-gtw.za8ad0657.bool.sh` -**Special Case - Preview Environment**: if the preview environment feature is activated, the created services will have an additional friendly domain following this format `prId-srvName-envSourceName.cluster_domain` where: +**Special Case - Preview Environment** +For each port exposed publicly, an additional domain will be created with the following pattern `portName-prId-srvName-envSourceName.cluster_domain`: +- portName: is the port name, as explained above - prID: is the id of the PR that has generated the preview environment - srvName: is the name of the service - envSourceName: is the name of the blueprint environment that has created the current preview environment -domain example: `123-frontend-blueprint.za8ad0657.bool.sh` +domain example: `p80-123-frontend-blueprint.za8ad0657.bool.sh` + +Note: +- each service deployed on the same cluster will have the same root domain assigned (example: `za8ad0657.bool.sh`) +- the first characters of the domain assigned to the application is based on the portName given to the port (See the [port section](#ports) +- a default domain (without the portName) is assigned to the `default port`(See the [port section](#ports)). Example `zdf72de72-z709e1a88-gtw.za8ad0657.bool.sh` -If you want to customize the url assigned to your application press the `Add Domain` button. +If you want to customize the domain assigned to your application press the `Add Domain` button.

Application Domains

+In this section, you can assign your custom domain via CNAME or just change the sub-domain assigned to your service. + -This configuration is removed every time the environment is cloned in order to avoid domain collision. +This configuration will be **automatically removed** on every cloned environment or preview environment in order to avoid domain collision. -You can use this section to either assign a specific sub-domain or either assign a completely new domain via a CNAME. - -#### Configuring a custom sub-domain -You can specify a custom sub-domain as long as it belongs to the assigned cluster domain (see above). -Example: -- your current domain is zdf72de71-z709e1a85-gtw.za8ad0659.bool.sh (so your assigned cluster domain is `za8ad0659.bool.sh`) -- you can enter a new custom domain `myfrontend-za8ad0659.bool.sh` (since it is a subdomain of the cluster domain) +#### Configuring a domain via CNAME -The application will now be accessible from both the default and the new custom domain +You can configure your DNS by adding a `CNAME` record so that your app will be accessible through your custom domain. Qovery will handle for you the network configuration and the TLS certificate. -Qovery does not check collision in the domain declaration. make sure you assign a subdomain that +[We prepared a guide and video tutorial that explains how to set up your custom domain.][guides.getting-started.setting-custom-domain] -#### Configuring a domain via CNAME -After setting up your custom domain, you'll see a `Value` that you need to set up as a `CNAME` record in your domain registrar. +#### Change the assigned sub-domain +You can specify a different sub-domain for your application as long as it belongs to the assigned cluster domain (see above). +Example: +- your current domain is zdf72de71-z709e1a85-gtw.za8ad0659.bool.sh (so your assigned cluster domain is `za8ad0659.bool.sh`) +- you can enter a new custom domain `myfrontend.za8ad0659.bool.sh` (since it is a subdomain of the cluster domain) + +The application will now be accessible from both the default and the new custom domain. -[We prepared a guide and video tutorial that explains how to set up your custom domain.][guides.getting-started.setting-custom-domain] +Qovery does not check collision in the domain declaration. Make sure you assign a unique subdomain within your cluster. -Setting up the `CNAME` on the domain provider side will make your app accessible through your custom domain on Qovery. The app will still be accessible through the default assigned domain. ## Connecting to a database To know how to access your database from your application, [have a look at the database section][docs.using-qovery.configuration.environment-variable#connecting-to-a-database]. diff --git a/website/docs/using-qovery/troubleshoot.md b/website/docs/using-qovery/troubleshoot.md index 2ee8baa4fc..47ad2837db 100644 --- a/website/docs/using-qovery/troubleshoot.md +++ b/website/docs/using-qovery/troubleshoot.md @@ -1,5 +1,5 @@ --- -last_modified_on: "2023-05-27" +last_modified_on: "2023-07-07" title: Troubleshoot description: "Everything you need to troubleshoot your application with Qovery" sidebar_label: hidden diff --git a/website/guides/getting-started/setting-custom-domain.md b/website/guides/getting-started/setting-custom-domain.md index d420152aae..0ae324b512 100644 --- a/website/guides/getting-started/setting-custom-domain.md +++ b/website/guides/getting-started/setting-custom-domain.md @@ -1,5 +1,5 @@ --- -last_modified_on: "2023-04-19" +last_modified_on: "2023-07-07" $schema: "/.meta/.schemas/guides.json" title: Custom domain description: How to set and use your own domain @@ -46,13 +46,28 @@ learn how to set up your domains on Qovery!

+ +
  • + +### Configure your DNS + +Configure your DNS by adding a CNAME record pointing to the domain provided by Qovery in the previous step + +If you have multiple public ports (or you want to have them in the future), make sure you add a CNAME for both yourdomain.com and *.yourdomain.com. + +In this way: +- your application default port will be accessible via the domain `yourdomain.com` or by a subdomain equal to the port name (portNameA.yourdomain.com). +- the other application public port will be accessible via a subdomain equal to the portName (portNameB.yourdomain.com). + +See the [port setup of your application][docs.using-qovery.configuration.application#ports] for more information on the port name setup. +
  • ### Your domain is ready -You need to **restart** your app to make your custom domain available. +You need to **restart** your app to use your custom domain on your application.
  • @@ -62,4 +77,5 @@ You need to **restart** your app to make your custom domain available. If you run into any trouble, [find us on Discord][urls.qovery_chat]. Our team and the community will be glad to help out. +[docs.using-qovery.configuration.application#ports]: /docs/using-qovery/configuration/application/#ports [urls.qovery_chat]: https://discord.qovery.com diff --git a/website/guides/getting-started/setting-custom-domain.md.erb b/website/guides/getting-started/setting-custom-domain.md.erb index 21dda0660e..8f67e9486c 100644 --- a/website/guides/getting-started/setting-custom-domain.md.erb +++ b/website/guides/getting-started/setting-custom-domain.md.erb @@ -37,13 +37,28 @@ learn how to set up your domains on Qovery!

    + +
  • + +### Configure your DNS + +Configure your DNS by adding a CNAME record pointing to the domain provided by Qovery in the previous step + +If you have multiple public ports (or you want to have them in the future), make sure you add a CNAME for both yourdomain.com and *.yourdomain.com. + +In this way: +- your application default port will be accessible via the domain `yourdomain.com` or by a subdomain equal to the port name (portNameA.yourdomain.com). +- the other application public port will be accessible via a subdomain equal to the portName (portNameB.yourdomain.com). + +See the [port setup of your application][docs.using-qovery.configuration.application#ports] for more information on the port name setup. +
  • ### Your domain is ready -You need to **restart** your app to make your custom domain available. +You need to **restart** your app to use your custom domain on your application.
  • diff --git a/website/static/img/configuration/application/app-15.png b/website/static/img/configuration/application/app-15.png index d629693868..1303eca633 100644 Binary files a/website/static/img/configuration/application/app-15.png and b/website/static/img/configuration/application/app-15.png differ diff --git a/website/static/img/configuration/application/app-16.png b/website/static/img/configuration/application/app-16.png index 50f52966b9..111bcc5aee 100644 Binary files a/website/static/img/configuration/application/app-16.png and b/website/static/img/configuration/application/app-16.png differ