1# Zed Server
2
3This crate is what we run at https://collab.zed.dev.
4
5It 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.
6
7# Local Development
8
9Detailed instructions on getting started are [here](https://zed.dev/docs/local-collaboration).
10
11# Deployment
12
13We run two instances of collab:
14
15- Staging (https://staging-collab.zed.dev)
16- Production (https://collab.zed.dev)
17
18Both of these run on the Kubernetes cluster hosted in Digital Ocean.
19
20Deployment is triggered by pushing to the `collab-staging` (or `collab-production`) tag in Github. The best way to do this is:
21
22- `./script/deploy-collab staging`
23- `./script/deploy-collab production`
24
25You can tell what is currently deployed with `./script/what-is-deployed`.
26
27# Database Migrations
28
29To create a new migration:
30
31```
32./script/create-migration <name>
33```
34
35Migrations are run automatically on service start, so run `foreman start` again. The service will crash if the migrations fail.
36
37When you create a new migration, you also need to update the [SQLite schema](./migrations.sqlite/20221109000000_test_schema.sql) that is used for testing.