Skip to content
Merged
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
19 changes: 19 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,25 @@ cd apps/typesync
pnpm publish --tag latest
```

## Deploying your own SyncServer to Railway

Setup a service and attach a volume under `/data` to it.

Since cache-mounts on Railway need to prefixed with the service ID and BuildKit doesn’t expand variables there. You must give it a literal value for the mount ID.

To do so you can fill in the service ID below and run the command before your `railway up` command.
More info here: https://docs.railway.com/guides/dockerfiles#cache-mounts
Get the service ID by using CMD/CTRL+K and search for `Copy Service ID`.

```sh
sed -i '' \
's|\(--mount=type=cache,id=\)workspace|\1s/<service-id>-pnpm-store|' \
Dockerfile
railway up
```

Note: By default horizontal scaling is disabled because of the attached volume.

## Deploying your own SyncServer to Fly.io (single instance)

```sh
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ WORKDIR /app
COPY --from=build /workspace/deployment/out .
# TODO: Remove this when we switch to an actual database.
ENV DATABASE_URL="file:/data/production.sqlite"
RUN npm run prisma migrate deploy --skip-generate
EXPOSE 3030
# can't use fly.io release_command because it doesn't mount the volume containing the sqlite db file
CMD ["sh", "-c", "npm run prisma migrate deploy && node dist/index.js"]
Loading