Skip to content

Commit 971af72

Browse files
authored
Merge pull request #271 from a16z-infra/self-host
Local dev & self hosting instructions revamp
2 parents 4ce6488 + 5dc2018 commit 971af72

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -132,20 +132,20 @@ again and update the `.env.local` file.
132132

133133
```sh
134134
# in .env.local
135-
CONVEX_SELF_HOST_ADMIN_KEY="<admin-key>" # Ensure there are quotes around it
136-
CONVEX_SELF_HOST_URL="http://127.0.0.1:3210"
135+
CONVEX_SELF_HOSTED_ADMIN_KEY="<admin-key>" # Ensure there are quotes around it
136+
CONVEX_SELF_HOSTED_URL="http://127.0.0.1:3210"
137137
```
138138

139139
Then set up the Convex backend (one time):
140140

141141
```sh
142-
npx convex self-host dev --run init --until-success
142+
npm run predev
143143
```
144144

145145
To continuously deploy new code to the backend and print logs:
146146

147147
```sh
148-
npx convex self-host dev --tail-logs
148+
npm run dev:backend
149149
```
150150

151151
To see the dashboard, visit `http://localhost:6791` and provide the admin key you generated earlier.
@@ -155,7 +155,7 @@ To see the dashboard, visit `http://localhost:6791` and provide the admin key yo
155155
If you'll be using Ollama for local inference, you'll need to configure Docker to connect to it.
156156

157157
```sh
158-
npx convex self-host env set OLLAMA_HOST http://host.docker.internal:11434
158+
npx convex env set OLLAMA_HOST http://host.docker.internal:11434
159159
```
160160

161161
To test the connection (after you [have it running](#ollama-default)):

fly/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -98,22 +98,22 @@ If you want to self-host the Convex backend on Fly.io, you can follow these step
9898
following variables:
9999

100100
```sh
101-
CONVEX_SELF_HOST_URL="<fly-backend-url>"
102-
CONVEX_SELF_HOST_ADMIN_KEY="<your-admin-key>"
101+
CONVEX_SELF_HOSTED_URL="<fly-backend-url>"
102+
CONVEX_SELF_HOSTED_ADMIN_KEY="<your-admin-key>"
103103
```
104104

105105
5. Deploy your Convex functions to the backend using the `convex` CLI from the project root.
106106

107107
To deploy the AI Town functions to the backend and start the game engine:
108108

109109
```sh
110-
npx convex self-host dev --run init --until-success
110+
npx convex dev --run init --once
111111
```
112112

113113
To continuously deploy code for development:
114114

115115
```sh
116-
npx convex self-host dev
116+
npx convex dev
117117
```
118118

119119
6. Deploy the frontend app to Fly.io from the root directory. See [above](#setup) for details.

package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"@types/react": "18.2.8",
2424
"@types/react-dom": "18.2.4",
2525
"clsx": "^2.0.0",
26-
"convex": "^1.19.0",
26+
"convex": "^1.19.1",
2727
"dotenv": "^16.1.4",
2828
"eslint": "8.42.0",
2929
"hnswlib-node": "^1.4.2",

0 commit comments

Comments
 (0)