Skip to content

Commit

Permalink
Add Delete project page (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaro00 authored Nov 7, 2023
1 parent a033f11 commit 11eb04b
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 6 deletions.
6 changes: 3 additions & 3 deletions configuration/project-name.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You might also want to use a name that is short and easy to remember.
The name of your Shuttle project can be set up in three different ways.
They are listed below in the same order as `cargo-shuttle` will prioritize them.

## via the `--name` option
### via the `--name` option

When running commands, the project name can always be overridden with the `--name` option, regardless of which directory you are in.

Expand All @@ -26,7 +26,7 @@ cargo shuttle start --name my-project-name
cargo shuttle deployment list --name my-project-name
```

## via Shuttle.toml
### via Shuttle.toml

The next method to specify a project name is by creating a `Shuttle.toml` file at the root level of the project's workspace.
In this file, place a key-value pair like so:
Expand All @@ -35,7 +35,7 @@ In this file, place a key-value pair like so:
name = "my-project-name"
```

## via Cargo.toml
### via Cargo.toml

In the absence of either of the previous two options, the project will be named based on the content of the `name = ` field of the `[package]` section in the `Cargo.toml` configuration file.

Expand Down
2 changes: 1 addition & 1 deletion introduction/how-shuttle-works.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This is possible due to the `#[shuttle_runtime::main]` procedural macro. The mac

![Shuttle macros](/images/shuttle-macros.png)

In the example above, the 3 annotations in the main function expand to code that makes the Shuttle runtime provision them on our end.
In the example above, the 2 annotations in the main function expand to code that makes the Shuttle runtime provision them on our end.

Here are the examples on how to use them, once you add the required annotations to your code:

Expand Down
7 changes: 5 additions & 2 deletions mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"apiKey": "phc_xbSdR723Tg2w0tf3O5I9nSYKBpXZJZnqKF8rYqn7SrF"
}
},

"logo": {
"light": "/images/logo/light.png",
"dark": "/images/logo/dark.png",
Expand Down Expand Up @@ -159,7 +158,11 @@
},
{
"group": "Support",
"pages": ["support/faq", "support/troubleshooting"]
"pages": [
"support/faq",
"support/troubleshooting",
"support/delete-project"
]
},
{
"group": "Community",
Expand Down
46 changes: 46 additions & 0 deletions support/delete-project.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: Delete project
description: How to delete projects, and how to solve common issues
---

<Warning>Deleting old projects can fail due to outdated or corrupt data. If you have tried all the steps below, but they keep failing or if a resource refuses to be deleted, please contact us on *[email protected]* from the email associated with your GitHub account. There, we can assist you with manually deleting projects.</Warning>

To delete a project, start off with

```bash
cargo shuttle project delete --name <name>
```

<Note>In these examples, the `--name` flag is used to specify the project name explicitly. Depending on your files, you might not need it. See [Project name](/configuration/project-name) for other alternatives.</Note>

If the delete command gives you a 503 error, try restarting the project. This is needed in order to check if the project has resources linked.

```bash
cargo shuttle project restart --name <name>
cargo shuttle project delete --name <name>
```

If you have a running deployment, you will be asked to stop it.

```bash
cargo shuttle stop --name <name>
```

If you have secrets recorded in the project, you will be asked to delete them.

```bash
cargo shuttle resource delete secrets --name <name>
```

If you have databases linked to the project, you will be asked to delete them.

```bash
# check which type of database
cargo shuttle resource list --name <name>
# example for a shared postgres db
cargo shuttle resource delete database::shared::postgres --name <name>
```

If secrets or databases are not being deleted successfully with the above commands, please contact us for further support.


0 comments on commit 11eb04b

Please sign in to comment.