Skip to content

Commit

Permalink
update docs (#1664)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcuskohlberg authored Dec 20, 2024
1 parent 613102d commit 9d2df3a
Show file tree
Hide file tree
Showing 20 changed files with 200 additions and 180 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ Encore comes with several built-in tools to help with testing:
Encore Cloud is Encore's managed service offering for teams wanting to focus their engineering effort on their product development, avoiding investing time in platformization and DevOps.
Encore Cloud provides **automatic infrastructure provisioning in your cloud on AWS & GCP**. So instead of writing Terraform, YAML, or clicking in cloud consoles, you [connect your cloud account](https://encore.dev/docs/platform/infrastructure/own-cloud) and simply deploy your application. Since using Encore's open source backend frameworks means your application code is cloud agnostic and not tied to any specific infrastructure services, Encore Cloud enables you to change your infrastructure depending on your evolving needs, without needing to make code changes or manually update infrastructure config files.
Encore Cloud provides **automatic infrastructure provisioning in your cloud on AWS & GCP**. So instead of writing Terraform, YAML, or clicking in cloud consoles, you [connect your cloud account](https://encore.dev/docs/platform/deploy/own-cloud) and simply deploy your application. Since using Encore's open source backend frameworks means your application code is cloud agnostic and not tied to any specific infrastructure services, Encore Cloud enables you to change your infrastructure depending on your evolving needs, without needing to make code changes or manually update infrastructure config files.
When you deploy, Encore Cloud automatically provisions [infrastructure](https://encore.dev/docs/platform/infrastructure/infra) using battle-tested cloud services on AWS and GCP, such as:
- **Compute:** GCP Cloud Run, AWS Fargate, Kubernetes (GKE and EKS)
Expand Down
2 changes: 1 addition & 1 deletion docs/go/develop/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ however by calling `encore.CurrentRequest().PathParams()` you can get access to

### Using Cloud Specific Services

All the [clouds](/docs/platform/infrastructure/own-cloud) contain a large number of services, not all of which Encore natively supports.
All the [clouds](/docs/platform/deploy/own-cloud) contain a large number of services, not all of which Encore natively supports.
By using information about the [environment](/docs/platform/deploy/environments), you can define the implementation of these and
use different services for each environment's provider. For instance if you are pushing audit logs into a data warehouse, when running on GCP you could use BigQuery, but when running on AWS you could use Redshift, when running locally you could
simply write them to a file.
Expand Down
2 changes: 1 addition & 1 deletion docs/go/primitives/cron-jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Cron Job executions across all your environments via the `Cron Jobs` menu item:
## Keep in mind when using Cron Jobs

- Cron Jobs do not execute during local development or in [Preview Environments](/docs/platform/deploy/preview-environments). However, you can manually invoke the API to test its behavior.
- In Encore Cloud, Cron Job executions are limited to **once every hour**, with the exact minute randomized within that hour for users on the Free Tier. To enable more frequent executions or to specify the exact minute within the hour, consider [deploying to your own cloud](/docs/platform/infrastructure/own-cloud) or upgrading to the [Pro plan](/pricing).
- In Encore Cloud, Cron Job executions are limited to **once every hour**, with the exact minute randomized within that hour for users on the Free Tier. To enable more frequent executions or to specify the exact minute within the hour, consider [deploying to your own cloud](/docs/platform/deploy/own-cloud) or upgrading to the [Pro plan](/pricing).
- Both public and private APIs are supported for Cron Jobs.
- Ensure that the API endpoints used in Cron Jobs are idempotent, as they may be called multiple times under certain network conditions.
- The API endpoints used in Cron Jobs must not take any request parameters. That is, their signatures must be `func(context.Context) error` or `func(context.Context) (*T, error)`.
Expand Down
2 changes: 1 addition & 1 deletion docs/go/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ It will look something like: `https://app.encore.cloud/$APP_ID/deploys/...`

🥐 Open the URL to access the Encore Cloud dashboard and check the progress of your deployment.

You can now use the Cloud Dashboard to view production [traces](/docs/go/observability/tracing), [connect your cloud account](/docs/platform/infrastructure/own-cloud), [integrate with GitHub](/docs/platform/integrations/github), and much more.
You can now use the Cloud Dashboard to view production [traces](/docs/go/observability/tracing), [connect your cloud account](/docs/platform/deploy/own-cloud), [integrate with GitHub](/docs/platform/integrations/github), and much more.

<video autoPlay playsInline loop controls muted className="w-full h-full">
<source src="/assets/docs/webdashvideo.mp4" className="w-full h-full" type="video/mp4"/>
Expand Down
10 changes: 5 additions & 5 deletions docs/menu.cue
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,11 @@
text: "Deploying & CI/CD"
path: "/platform/deploy/deploying"
file: "platform/deploy/deploying"
}, {
kind: "basic"
text: "Connect your cloud account"
path: "/platform/deploy/own-cloud"
file: "platform/deploy/own-cloud"
}, {
kind: "basic"
text: "Environments"
Expand All @@ -1017,11 +1022,6 @@
kind: "section"
text: "Infrastructure"
items: [{
kind: "basic"
text: "Connect your cloud account"
path: "/platform/infrastructure/own-cloud"
file: "platform/infrastructure/own-cloud"
}, {
kind: "basic"
text: "Infrastructure overview"
path: "/platform/infrastructure/infra"
Expand Down
54 changes: 27 additions & 27 deletions docs/platform/deploy/deploying.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,87 +6,87 @@ subtitle: Encore Cloud automates the deployment and infrastructure provisioning
lang: platform
---

Encore Cloud simplifies the deployment and infrastructure provisioning process, making it as straightforward as pushing to a git repository, removing the need for manual steps.
Encore Cloud simplifies deploying your application, making it as simple as pushing to a git repository, removing the need for manual steps.

## Deploying your application

### Step 1: Pre-requisites

Before deploying, ensure that you have created an **Encore application** and an **Encore Cloud account**.
Before deploying, ensure that you have an **Encore Cloud account** and have created an **Encore application**.

If you haven't created one yet, you can do so by running the following command:
You can create both an account and an application by running the following command:

```shell
$ encore app create
```

You will be asked to create a free Encore Cloud account first and can then create a new Encore application.
You will be asked to create a free Encore Cloud account first, and you will then proceed to create a new Encore application.

### Step 2: Integrate with GitHub (Optional)

When you create an Encore application while logged into your Encore Cloud account in the CLI, Encore will automatically create a new Encore managed git repository.
When creating an Encore application, Encore will automatically create a new Encore managed git repository.
If you are just trying out Encore Cloud, you can use this and skip the rest of this step.

For production applications, we recommend integrating with GitHub instead of the built-in Encore managed git:
For production applications we recommend integrating with GitHub instead of the built-in Encore managed git:

**Integrating with GitHub:** Open your app in the **[Encore Cloud dashboard](https://app.encore.cloud/) > (Select your app) > App Settings > Integrations > GitHub**.
Click the **Connect Account to GitHub** button, which will open GitHub where you can grant access either to all repositories or only the specific one(s) you want to link with Encore Cloud.
#### **Connecting your GitHub account**

For more information and details on how to configure different repository structures, [see the full docs on integrating with GitHub](/docs/platform/integrations/github).
Open your app in the **[Encore Cloud dashboard](https://app.encore.cloud/) > (Select your app) > App Settings > Integrations > GitHub**.
Click the **Connect Account to GitHub** button, which will open GitHub where you can grant access either to the relevant repositorie(s).

Once you have integrated with GitHub, you can push code to GitHub to trigger Encore Cloud's deployment process. If you use Encore Cloud Pro, you will also get automatic [Preview Environments](/docs/platform/deploy/preview-environments) for each pull request.
[See the full docs](/docs/platform/integrations/github) on integrating with GitHub to learn how to configure different repository structures.

Once connected to GitHub, pushing code will trigger deployments automatically. Encore Cloud Pro users get [Preview Environments](/docs/platform/deploy/preview-environments) for each pull request.

### Step 3: Connect your AWS / GCP account (Optional)

If you want to deploy to your own cloud on AWS or GCP, you first need to connect your cloud account to Encore Cloud.
Deploy to your own cloud on AWS or GCP by connection your cloud account to Encore Cloud.

If you're just trying out Encore Cloud, skip this step to deploy to a free development environment using Encore Cloud's hosting, subject to [fair use limits](/docs/platform/management/usage).

If you are just trying out Encore Cloud, you can skip this step and Encore Cloud will automatically deploy to an environment using Encore Cloud's free development hosting, subject to the [fair use limits](/docs/platform/management/usage).
#### **Connecting your cloud account**

**Connect your cloud account:** Open your app in the **[Encore Cloud dashboard](https://app.encore.cloud/) > (Select your app) > App Settings > Integrations > Connect Cloud**.
Open your app in the **[Encore Cloud dashboard](https://app.encore.cloud/) > (Select your app) > App Settings > Integrations > Connect Cloud**.

Learn more in the [connecting your AWS or GCP account docs](/docs/platform/infrastructure/own-cloud).
Learn more in the [connecting your cloud docs](/docs/platform/deploy/own-cloud).

### Step 4: Deploying Your Application
### Step 4: Push to deploy

To deploy your application, simply push your code to the connected Git repository.
Deploy your application by pushing your code to the connected Git repository.

- **If you are using Encore Cloud's managed git**: Run the following command to deploy your application:
- **Using Encore Cloud's managed git**:

```shell
$ git add -A .
$ git commit -m 'Commit message'
$ git push encore
```

- **If you are using GitHub:** Just a standard `git push` to your repository will work:
- **If you have connected your GitHub account:**

```shell
$ git add -A .
$ git commit -m 'Commit message'
$ git push origin
```

In both scenarios, this will trigger Encore Cloud's deployment process, consisting of the following phases:
This will trigger Encore Cloud's deployment process, consisting of the following phases:
* A build & test phase
* An infrastructure provisioning phase
* A deployment phase

These phases are combined into a unified entity called a *Rollout*.
A rollout represents the coordinated process of rolling out a specific version of an Encore application.
(We use the term *rollout* to disambiguate from the *deployment phase*.)

Once you've pushed your code, you can monitor the progress in the **[Encore Cloud dashboard](https://app.encore.cloud/) > (Select your app) > Deployments**.

### Integrating using Encore Cloud's API

You can also trigger a deployment using Encore Cloud's API, learn more in the [API reference](/docs/platform/integrations/api-reference).

## Configuring deploy trigger

When using GitHub, you can configure Encore Cloud to automatically trigger deploys when you push to a specific branch name.

To configure which branch name is used to trigger deploys, open your app in the [Encore Cloud dashboard](https://app.encore.cloud) and go to the **Overview** page for your intended environment. Click on **Settings** and then in the section **Branch Push** configure the `Branch name` and hit save.

### Integrating using Encore Cloud's API

You can trigger deployments using Encore Cloud's API, learn more in the [API reference](/docs/platform/integrations/api-reference).

## Configuring custom build settings

If you want, you can override certain aspects of the CI/CD process in the `encore.app` file:
Expand Down
Loading

0 comments on commit 9d2df3a

Please sign in to comment.