zed/crates/collab/README.md
Conrad Irwin 7b9d51929d
Deploy collab like nightly (#7174)
After this change we'll be able to push a tag to github to deploy to
collab.

The advantages of this are that there's no longer a separate step to
first
build the image, and then deploy it.

In the future I'd like to make this happen more automatically (maybe as
part of
bump nightly).

Release Notes:

- N/A
2024-02-01 11:54:49 -07:00

37 lines
1.2 KiB
Markdown

# Zed Server
This crate is what we run at https://collab.zed.dev.
It contains our back-end logic for collaboration, to which we connect from the Zed client via a websocket after authenticating via https://zed.dev, which is a separate repo running on Vercel.
# Local Development
Detailed instructions on getting started are [here](https://zed.dev/docs/local-collaboration).
# Deployment
We run two instances of collab:
* Staging (https://staging-collab.zed.dev)
* Production (https://collab.zed.dev)
Both of these run on the Kubernetes cluster hosted in Digital Ocean.
Deployment is triggered by pushing to the `collab-staging` (or `collab-production`) tag in Github. The best way to do this is:
* `./script/deploy-collab staging`
* `./script/deploy-collab production`
You can tell what is currently deployed with `./script/what-is-deployed`.
# Database Migrations
To create a new migration:
```
./script/sqlx migrate add <name>
```
Migrations are run automatically on service start, so run `foreman start` again. The service will crash if the migrations fail.
When you create a new migration, you also need to update the [SQLite schema](./migrations.sqlite/20221109000000_test_schema.sql) that is used for testing.