You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+6-3
Original file line number
Diff line number
Diff line change
@@ -27,8 +27,11 @@ Run `npm run buildAndCalcAnalytics` to run analytics manually and get the report
27
27
28
28
### Deployment
29
29
30
-
Deployed instance of server is running on Heroku. Whatever you push to `production` branch automatically gets re-deployed to Heroku.
30
+
The bot is deployed to [Fly](https://fly.io/). The `fly.toml` file contains the configuration for the deployment. The Fly deployoment uses the `Dockerfile`to build the image.
31
31
32
-
Heroku cares about `Procfile` that we have in the root of the project, and will run the command there to start the project once deployed.
32
+
The bot is deployed automatically on every push to the `production` branch. You can also deploy with the Fly CLI by running `fly deploy`.
33
33
34
-
Heroku knows it is a node project, so it will run `npm install` when deploying it, which will also run `npm run postinstall`, which is why it all works, because `npm run postinstall` does building (of TS).
34
+
The Fly.io server on which wasp-bot is deployed has a persistent volume attached to it called `wasp_bot_storage` mounted at `/data` dir, in order to persist the cached analytics events from Posthog between deployments.
35
+
Our Wasp-bot app provides the `WASP_ANALYTICS_CACHED_EVENTS_JSON_PATH` environment variable, which in this case we set to point to `/data/wasp-analytics-cached-events.json`.
36
+
37
+
You can check production app logs with `fly logs` and SSH into the app container with `fly ssh console`.
0 commit comments