Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor changes to volumes' docs #101

Merged
merged 2 commits into from
Sep 9, 2024
Merged
Changes from 1 commit
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
22 changes: 10 additions & 12 deletions pages/edge/learn/volumes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ In the current initial implementation, volumes are restricted to a single
[Edge region](/edge/learn/regions).

Volumes also at the moment only provide *read-write-many* semantics.
Due the automatic auto-scaling for apps, this means that volumes are not currently
Due to the automatic auto-scaling for apps, this means that volumes are not currently
well-suited for databases or other more complex use cases that require a single writer.

Keep in mind that volumes can be accessed concurrently, and even from different
Expand All @@ -22,7 +22,7 @@ These restrictions (including the single-region restriction) will be lifted
in the future.
</Callout>

## Using Volumes With rclone
## Create and Use Volumes

* Every app may have multiple volumes.
* Each volume has a name, which must be unique for the application.
Expand All @@ -39,19 +39,17 @@ volumes:
# A name for your volume.
# Must be unique for the given app.
- name: data
# Where to mount the volume into the filesystem.
# You can specify multiple mounts with optional subpaths.
mounts:
# Mount the volume to `/data`.
- mount_path: /data
# Optional: the subdirectory of the volume to mount.
# subpath: /subpath
# Create a persistent volume named "data" in `/data`.
mount: /data

- name: more_data
# Create a persistent volume named "more_data" in `/other_mntpoint`.
mount: /other_mntpoint
```

This will create a new "data" volume, which will be mounted at `/data`.
This will create two new volumes: "data", which will be mounted at `/data` and "more_data" which will be mounted at `/other_mntpoint`.

Now just re-deploy your app with `wasmer deploy`.
The volume will be automatically created.
Now just re-deploy your app with `wasmer deploy`, and the volume will be automatically created.

Your application can now use the mount path and treat it as persistent storage.

Expand Down
Loading