-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
962 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
name: Docs | ||
logo: "/assets/globe_dark.png" | ||
logoDark: "/assets/globe_light.png" | ||
twitter: dart_globe | ||
anchors: | ||
- title: Discord | ||
icon: discord | ||
link: https://invertase.link/globe-discord | ||
theme: "#FFA03F" | ||
favicon: "/assets/globe_dark.png" | ||
sidebar: | ||
- - Overview | ||
- "/" | ||
- - Getting Started | ||
- "/getting-started" | ||
- - CLI | ||
- - - CLI Overview | ||
- "/cli" | ||
- - Deploy | ||
- "/cli.commands.deploy" | ||
- - Link | ||
- "/cli.commands.link" | ||
- - Login | ||
- "/cli.commands.login" | ||
- - Logout | ||
- "/cli.commands.logout" | ||
- - Unlink | ||
- "/cli.commands.unlink" | ||
- - Deployments | ||
- - - Overview | ||
- "/deployments" | ||
- - Build Settings | ||
- "/deployments.build-settings" | ||
- - Domains | ||
- "/deployments.domains" | ||
- - Environment Variables | ||
- "/deployments.environment-variables" | ||
- - GitHub Integration | ||
- "/deployments.github-integration" | ||
- - Hooks | ||
- "/deployments.hooks" | ||
- - Redeployments | ||
- "/deployments.redeployments" | ||
- - Frameworks | ||
- - - Overview | ||
- "/frameworks" | ||
- - Dart Frog | ||
- "/frameworks.dart-frog" | ||
- - Jaspr | ||
- "/frameworks.jaspr" | ||
- - Infrastructure | ||
- - - Overview | ||
- "/infrastructure" | ||
- - Cold Starts | ||
- "/infrastructure.cold-starts" | ||
- - Cron Jobs | ||
- "/infrastructure.cron-jobs" | ||
- - Headers | ||
- "/infrastructure.headers" | ||
- - Regions | ||
- "/infrastructure.regions" | ||
- - WebSockets | ||
- "/infrastructure.websockets" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: Deploy a project with the Globe CLI | ||
description: Deploy your Dart application to Globe directly from the command line. | ||
--- | ||
|
||
# Deploy | ||
|
||
The `deploy` command allows you to deploy your Dart application to Globe directly from the command line. | ||
|
||
If you have not yet [linked a project](/docs/cli/commands/link), you will be prompted to do so before deploying. | ||
|
||
### Usage | ||
|
||
To deploy a project, run the following command from your Dart project root directory. | ||
|
||
```bash | ||
globe deploy | ||
``` | ||
|
||
The CLI will upload your project to Globe and trigger a new deployment. Upon success, you will provided a URL to view deployment progress on the Globe dashboard. | ||
|
||
By default, deployments via the `deploy` command are treated as a preview deployment. This means that once deployed, the deployment will have it's own unique URL generated by Globe. | ||
To deploy as a production deployment, append the `--prod` flag to the command. | ||
|
||
```bash | ||
globe deploy --prod | ||
``` | ||
|
||
When successfully built, the deployment will be promoted to production and will be accessible via the project's primary domain(s). | ||
|
||
You can learn more about [preview and production deployments](/docs/deployments) in the deployments documentation. | ||
|
||
### Flags | ||
|
||
The command has flags (in addition to [global flags](/docs/cli)) that can be used to modify the behavior of the command, which can be accessed by running `globe deploy --<flag>`: | ||
|
||
- `--prod` - Creates a deployment which will be promoted to production once built. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: Link a project to Globe | ||
--- | ||
|
||
# Link | ||
|
||
The `link` command links a local Dart project to a Globe project. Linking is required to deploy a project to Globe. | ||
|
||
Project linking is carried out automatically if the project is not yet linked when running the [`deploy`](/docs/cli/commands/deploy) command. | ||
|
||
## Usage | ||
|
||
```bash | ||
globe link | ||
``` | ||
|
||
The `link` command will first prompt, asking whether you wish to continue linking the local project. If you continue, you will be further prompted to: | ||
|
||
1. Select an account you wish to link this project to. | ||
2. Select, or create a new project to link this project to. | ||
|
||
Upon completion, the project will be linked to your Globe account and you will be able to deploy the project. | ||
|
||
## Details | ||
|
||
A linked project stores metadata about the project in the local `.dart_tool/dart_globe` directory on your machine. This metadata is used to identify the project when deploying to Globe. If not already, | ||
the `.dart_tool` directory should not be committed to your Git repository. You can add this directory to your `.gitignore` file to ensure it is not committed. | ||
|
||
If you accidentally delete this directory, or run the [`unlink`](/docs/cli/commands/unlink) command, you will need to re-link the project before you can deploy again. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: Login to Globe | ||
--- | ||
|
||
# Login | ||
|
||
The `login` command allows you to authenticate your local CLI with your Globe account. This is required before you can deploy any projects. | ||
|
||
## Usage | ||
|
||
```bash | ||
globe login | ||
``` | ||
|
||
A new browser window will open prompting you to login to your Globe account. Once you have logged in, you will be redirected to a page notifying you of a successful login. You can close this page once complete. | ||
Globe will store a secure token on your local machine to authenticate future requests. | ||
|
||
If you wish to [logout](/docs/cli/commands/logout), you can run the following command: | ||
|
||
```bash | ||
globe logout | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
title: Logout of Globe | ||
--- | ||
|
||
# Logout | ||
|
||
The `logout` command allows removes any prior authentication tokens from your local machine. Once you have logged out, you will need to login again before you can deploy any projects. | ||
|
||
## Usage | ||
|
||
```bash | ||
globe logout | ||
``` | ||
|
||
A message will be displayed notifying you that you have been logged out. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
title: Unlink a project from Globe | ||
--- | ||
|
||
# Unlink | ||
|
||
The `unlink` command removes any previously linked projects from the current local project. This will prevent you from deploying the project to Globe. | ||
|
||
## Usage | ||
|
||
```bash | ||
globe unlink | ||
``` | ||
|
||
## Details | ||
|
||
The command removes the `.dart_tool/dart_globe` directory from the local project. This directory stores metadata about the project, which is used to identify the project when deploying to Globe. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
title: Globe CLI | ||
description: Install and start deploying using the Globe CLI. | ||
--- | ||
|
||
# Globe CLI | ||
|
||
The Globe CLI is a command line tool that helps you deploy and interact with your Dart applications via Globe. | ||
|
||
## Pre-requisites | ||
|
||
To get started, you must have the [Dart SDK](https://dart.dev/get-dart) installed on your machine. | ||
|
||
## Installation | ||
|
||
To install the Globe CLI, run the following command: | ||
|
||
```bash | ||
dart pub global activate globe_cli | ||
``` | ||
|
||
Once installed, you can access the `globe` executable from anywhere on your machine. | ||
|
||
To login with your Globe account, run the following command: | ||
|
||
```bash | ||
globe login | ||
``` | ||
|
||
## Commands | ||
|
||
The Globe CLI provides the following commands, which can be accessed by running `globe <command>`: | ||
|
||
- [`deploy`](/cli/commands/deploy) - Deploy your Dart application to Globe directly from the command line. | ||
- [`link`](/cli/commands/link) - Link a local project to a Globe project. | ||
- [`login`](/cli/commands/login) - Login to your Globe account. | ||
- [`logout`](/cli/commands/logout) - Logout of your Globe account. | ||
- [`unlink`](/cli/commands/unlink) - Unlink a local project from a Globe project. | ||
|
||
## Global Flags | ||
|
||
All CLI commands have global flags that can be used to modify the behavior of the command, which can be accessed by running `globe <command> --<flag>`. | ||
|
||
- `--help` - Display help information for the command. | ||
- `--verbose` - Display verbose output for the command, such as API calls and debug information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
title: Build Settings | ||
--- | ||
|
||
# Build Settings | ||
|
||
Build settings allow you to configure how your project is build during a new deployment. You can configure your build settings via the dashboard: **Project** -> **Settings** -> **General**. | ||
|
||
![Project Settings](/docs/project-settings.png) | ||
|
||
## Settings | ||
|
||
You can configure the following build settings: | ||
|
||
- [Dart Version](#dart-version) | ||
- [Root Directory](#root-directory) | ||
- [Framework Preset](#framework-preset) | ||
- [Build Command](#build-command) | ||
- [Entrypoint](#entrypoint) | ||
|
||
--- | ||
|
||
### Dart Version | ||
|
||
The Dart version to use when building your project. By default, Globe will use the latest stable version of Dart. Currently Dart supports `stable` and `beta` version branches. | ||
|
||
Support for specific tagged versions is coming soon. | ||
|
||
--- | ||
|
||
### Root Directory | ||
|
||
The root directory is the directory which contains your project source. If working with mono-repositories of a directory structure where your application is not at the root where the `pubspec.yaml` file exists. | ||
|
||
--- | ||
|
||
### Framework Preset | ||
|
||
Globe supports existing [frameworks](/docs/frameworks). If a framework is specified here, Globe will use default values required to build and deploy your framework application. If you'd like to override these values, you can do so by specifying a value in the specific build settings. | ||
|
||
--- | ||
|
||
### Build Command | ||
|
||
A build command can be executed after project dependencies have been installed. This is useful if you need to run a build step before your application can be deployed. | ||
|
||
If using a **Framework Preset**, a default value will be used instead. You can override this by specifying a value here. | ||
|
||
--- | ||
|
||
### Entrypoint | ||
|
||
When building your application, the build system requires an entrypoint file which is used to bootstrap your application. The is typically the `lib/main.dart` file in your project | ||
which contains a `main` function. | ||
|
||
This setting can be configured if your application uses a different entrypoint file. | ||
|
||
If using a **Framework Preset**, a default value will be used instead. You can override this by specifying a value here. | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
title: Domains | ||
--- | ||
|
||
# Domains | ||
|
||
A domain is the address of your deployment. | ||
|
||
Each deployment, production or preview gets assigned a unique domain which directly points to the specific deployment. If the deployment is not yet ready or successful, visiting a domain will redirect you to the dashboard for that deployment. | ||
|
||
## Production domains | ||
|
||
Each project gets assigned a unique domain when it is created. Whenever you successfully deploy to the production environment, the production domain will be updated to point to the latest deployment. | ||
|
||
### Custom Domains | ||
|
||
Custom domains are not yet supported. We are working on it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
title: Environment Variables | ||
--- | ||
|
||
# Environment Variables | ||
|
||
Environment variables are a set of named values that can affect the way running processes will behave on a deployment. An environment variable can be used to store secret values which are not safe to be stored in the codebase. You may wish to use | ||
different values for different environments, such as development, preview, and production to connect to different databases or API endpoints. | ||
|
||
## Creating environment variables | ||
|
||
To create a new environment variable, navigate to the **Environment Variables** tab in the **Settings** section of the project on the dashboard. Click the **Add Variable** button. | ||
|
||
![New Environment Variable](/docs/new-env-variable.png) | ||
|
||
Enter the name and value of your variable. All values are encrypted, and can only be viewed by a specifically viewing it on the dashboard. | ||
|
||
It is also possible to specify what environments the variable should be available in. | ||
|
||
## Accessing environment variables | ||
|
||
Within your Dart code, you can access environment variables using the `Platform.environment` map. | ||
|
||
```dart | ||
String? value = Platform.environment['MY_VARIABLE']; | ||
``` | ||
|
||
## System environment variables | ||
|
||
The following environment variables are available on all deployments: | ||
|
||
| Name | Description | | ||
| ------ | ----------------------------------------------- | | ||
| `PORT` | The port that the application should listen on. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: GitHub Integration | ||
--- | ||
|
||
# GitHub Integration | ||
|
||
Globe integrates with GitHub via the [GitHub Application](https://github.com/apps/dart-globe). | ||
|
||
## Features | ||
|
||
- Import a new project from GitHub, specifying the repository, root directory and branch of your Dart project. | ||
- Create new deployments when you push to GitHub. | ||
- Trigger production builds whenever you push to a specified production branch. | ||
- Show deployment status on each commit. | ||
|
||
## Authorization | ||
|
||
TODO: Add authorization instructions. | ||
|
||
## Configuration | ||
|
||
TODO: Add configuration instructions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
title: Deployment Hooks | ||
--- | ||
|
||
# Deployment Hooks | ||
|
||
Deployment hooks allow you to provide a webhook endpoint which will be called throughout the lifecycle of a deployment, for example | ||
when a deployment is created, built, or deployed. | ||
|
||
Deployment hooks are an in development feature and will be available soon. |
Oops, something went wrong.