Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions cloud_docs/concepts/deployments.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,19 @@ serverpod cloud deploy --output deployment.zip --wet-run

## Configure what's included

A `.scloudignore` file in your project root controls which files are packaged. The syntax mirrors `.gitignore`.
A deploy uploads your server project. In a Serverpod 4 project, which is a Dart workspace, it also uploads the workspace packages your server depends on and the workspace's root `pubspec.yaml` and `pubspec.lock`. Your Flutter app and other folders at the workspace root aren't uploaded.

By default, every file ignored by `.gitignore` is also excluded from the deployment. To include files that `.gitignore` excludes, prefix the pattern with `!` in your `.scloudignore`:
Within what's uploaded, a deploy leaves out:

```text title=".scloudignore"
- Files your `.gitignore` files exclude
- Hidden files and folders, whose names start with `.`
- Files your `.scloudignore` files exclude

The CLI creates a `.scloudignore` in your server project, such as `my_project_server/`, when you link or deploy the project. In a workspace, it also creates one in the workspace root. Its template already leaves out your passwords and config files. It also keeps your generated code and the files under `web/`, such as your Flutter web build, even where `.gitignore` excludes them.

The syntax mirrors `.gitignore`. A pattern with a `/` at the start or in the middle is relative to the folder of the `.scloudignore` it's in. Other patterns match at any depth. To upload a file that a `.gitignore` excludes, add the pattern with a `!` prefix to a `.scloudignore` in the same folder as that `.gitignore`, or in a folder below it. For files in your server project, that's usually the server project's `.scloudignore`:

```text title="my_project_server/.scloudignore"
# Exclude a specific file
/specific_file.txt

Expand Down
4 changes: 2 additions & 2 deletions cloud_docs/guides/ship-non-dart-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Include configuration files, templates, data, or other non-Dart ass

# Ship non-Dart files with your server

Bundle non-Dart files (configuration, templates, CSV data, binary blobs) with your server code on Cloud. Place them in an `assets/` folder at the project root and read them with `./assets/<path>` at runtime.
Bundle non-Dart files (configuration, templates, CSV data, binary blobs) with your server code on Cloud. Place them in an `assets/` folder in your server project and read them with `./assets/<path>` at runtime.

## Before you start

Expand Down Expand Up @@ -37,7 +37,7 @@ Then deploy:
serverpod cloud deploy
```

Cloud zips your project directory and includes every file that isn't excluded from the deploy package (see [Control what gets uploaded](#control-what-gets-uploaded) below). The `assets/` name is the Serverpod naming convention for this folder. You can call it anything, but the rest of this guide assumes `assets/`.
Cloud zips your server project and includes every file that isn't excluded from the deploy package (see [Control what gets uploaded](#control-what-gets-uploaded) below). The `assets/` name is the Serverpod naming convention for this folder. You can call it anything, but the rest of this guide assumes `assets/`.

To preview which files Cloud will upload before deploying:

Expand Down
2 changes: 1 addition & 1 deletion cloud_docs/reference/cli/commands/project/_project.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ If the project doesn't need a database, pass `--no-enable-db` instead. Once crea
The link command writes or updates three files in your local project directory:

1. **`scloud.yaml`**: contains the project ID that ties your codebase to the Cloud project. Created in your server package directory (or the one specified with `--project-dir`).
2. **`.scloudignore`**: created from a template if it doesn't exist; defines which files should be excluded when uploading to Cloud (syntax mirrors `.gitignore`).
2. **`.scloudignore`**: created from a template if it doesn't exist, in your server package directory and, for a workspace, in the workspace root. It defines which files are excluded when uploading to Cloud (syntax mirrors `.gitignore`).
3. **`.gitignore`**: if your project is a workspace, the `.scloud/` directory is added to keep deployment artifacts out of version control.
Loading