Skip to content

Commit 56e8851

Browse files
committed
move contributors info to CONTRIBUTING.md
1 parent a3f20fc commit 56e8851

2 files changed

Lines changed: 59 additions & 59 deletions

File tree

CONTRIBUTING.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Contributing
2+
3+
## Upgrading Dependencies
4+
5+
```sh
6+
pnpm up --interactive --latest -r
7+
```
8+
9+
## Publishing
10+
11+
```sh
12+
pnpm build
13+
# publish hypergraph
14+
cd packages/hypergraph/publish
15+
pnpm publish
16+
# publish hypergraph-react
17+
cd packages/hypergraph-react/publish
18+
pnpm publish
19+
# publish typesync
20+
cd apps/typesync
21+
pnpm publish --tag latest
22+
```
23+
24+
## Deploying your own SyncServer to Fly.io (single instance)
25+
26+
```sh
27+
# change the name of the `app` and `primary_region` in the fly.toml file
28+
29+
# create a volume for the sqlite db file - replace `fra` with your region
30+
fly volumes create data -s 1 -r fra
31+
32+
# set the DATABASE_URL (not sure if it's necessary since already set in the Dockerfile)
33+
fly secrets set DATABASE_URL=file:/data/production.sqlite
34+
# set the Privy app secret, id and chain (fill in your values)
35+
fly secrets set PRIVY_APP_SECRET=<PRIVY_APP_SECRET>
36+
fly secrets set PRIVY_APP_ID=<PRIVY_APP_ID>
37+
fly secrets set HYPERGRAPH_CHAIN=<HYPERGRAPH_CHAIN>
38+
39+
# deploy (ha=false to avoid starting multiple instances)
40+
fly launch --ha=false
41+
42+
# probably not necessary, but better safe than sorry
43+
fly scale count 1
44+
```
45+
46+
Resources:
47+
- https://fly.io/docs/js/prisma/sqlite/
48+
- https://programmingmylife.com/2023-11-06-using-sqlite-for-a-django-application-on-flyio.html
49+
- https://community.fly.io/t/backup-and-restore-sqlite-db-to-server/21232/2
50+
51+
### Multi-region deployments
52+
53+
As an alternative you might want to setup a lite-fs volume for multi-region deployments.
54+
55+
Resources:
56+
- https://github.com/epicweb-dev/node-sqlite-fly-tutorial/tree/main/steps
57+
- https://www.epicweb.dev/tutorials/deploy-web-applications/multi-region-data-and-deployment/prepare-for-multi-region-data-with-litefs
58+
- https://fly.io/docs/litefs/speedrun/

README.md

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -75,62 +75,4 @@ To run the docs locally, you can run:
7575
```sh
7676
cd docs
7777
pnpm start
78-
```
79-
80-
81-
## Upgrading Dependencies
82-
83-
```sh
84-
pnpm up --interactive --latest -r
85-
```
86-
87-
## Publishing
88-
89-
```sh
90-
pnpm build
91-
# publish hypergraph
92-
cd packages/hypergraph/publish
93-
pnpm publish
94-
# publish hypergraph-react
95-
cd packages/hypergraph-react/publish
96-
pnpm publish
97-
# publish typesync
98-
cd apps/typesync
99-
pnpm publish --tag latest
100-
```
101-
102-
## Deploying your own SyncServer to Fly.io (single instance)
103-
104-
```sh
105-
# change the name of the `app` and `primary_region` in the fly.toml file
106-
107-
# create a volume for the sqlite db file - replace `fra` with your region
108-
fly volumes create data -s 1 -r fra
109-
110-
# set the DATABASE_URL (not sure if it's necessary since already set in the Dockerfile)
111-
fly secrets set DATABASE_URL=file:/data/production.sqlite
112-
# set the Privy app secret, id and chain (fill in your values)
113-
fly secrets set PRIVY_APP_SECRET=<PRIVY_APP_SECRET>
114-
fly secrets set PRIVY_APP_ID=<PRIVY_APP_ID>
115-
fly secrets set HYPERGRAPH_CHAIN=<HYPERGRAPH_CHAIN>
116-
117-
# deploy (ha=false to avoid starting multiple instances)
118-
fly launch --ha=false
119-
120-
# probably not necessary, but better safe than sorry
121-
fly scale count 1
122-
```
123-
124-
Resources:
125-
- https://fly.io/docs/js/prisma/sqlite/
126-
- https://programmingmylife.com/2023-11-06-using-sqlite-for-a-django-application-on-flyio.html
127-
- https://community.fly.io/t/backup-and-restore-sqlite-db-to-server/21232/2
128-
129-
### Multi-region deployments
130-
131-
As an alternative you might want to setup a lite-fs volume for multi-region deployments.
132-
133-
Resources:
134-
- https://github.com/epicweb-dev/node-sqlite-fly-tutorial/tree/main/steps
135-
- https://www.epicweb.dev/tutorials/deploy-web-applications/multi-region-data-and-deployment/prepare-for-multi-region-data-with-litefs
136-
- https://fly.io/docs/litefs/speedrun/
78+
```

0 commit comments

Comments
 (0)