Skip to content

Commit

Permalink
📝 Update local installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Oct 1, 2024
1 parent d90dec7 commit 088678b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 22 deletions.
34 changes: 14 additions & 20 deletions apps/docs/contribute/guides/local-installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,47 +13,41 @@ icon: 'laptop'

## Running the project locally

1. Install dependencies
1. Make sure you have node, [bun](https://bun.sh/docs/installation) and [docker](https://docs.docker.com/compose/install/) installed. For node, I suggest you use [`proto`](https://moonrepo.dev/proto) or [`nvm`](https://github.com/nvm-sh/nvm) allowing you to manage different versions. It should then autodetect which version need to be installed before running any command.

2. Install dependencies

```sh
cd typebot.io
bun i
bun install
```

2. Set up environment variables
3. Set up environment variables

Copy `.env.dev.example` to `.env`

Check out the [Configuration guide](https://docs.typebot.io/self-hosting/configuration) if you want to enable more options

3. Make sure you have [Docker](https://docs.docker.com/compose/install/) running
4. If you use the default DATABASE_URL, you need a matching database running. You can do that easily with the provided `docker-compose.dev.yml` file:

4. Make sure you have Node.js installed. I suggest you use [`nvm`](https://github.com/nvm-sh/nvm) allowing you to manage different versions. Once you installed nvm, you can install and use the latest version of Node.js: `nvm install && nvm use`
```sh
docker compose -f docker-compose.dev.yml -d up
```

5. Start the builder and viewer

```sh
bun dev
bunx turbo dev --filter=builder... --filter=viewer...
```

Builder is available at [`http://localhost:3000`](http://localhost:3000)

Viewer is available at [`http://localhost:3001`](http://localhost:3001)

Database inspector is available at [`http://localhost:5555`](http://localhost:5555)

By default, you can easily authenticate in the builder using the "Github Sign In" button. For other options, check out the [Configuration guide](https://docs.typebot.io/self-hosting/configuration)

6. (Optional) Start the landing page

```sh
cd ee/apps/landing-page
bun dev
```

7. (Optional) Start the docs
6. Optionnally you can also run the other available apps:

```sh
cd apps/docs
bun start
```
```sh
bunx turbo dev --filter=builder... --filter=viewer... [email protected]/prisma... --filter=landing-page... --filter=docs...
```
4 changes: 4 additions & 0 deletions apps/docs/self-hosting/breaking-changes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ If you still want to use the same keys for all Google APIs, you just have to set
### New license

The license was changed from AGPLv3 to FSL. It means that you can't fork the project to commercialize a Typebot competitor anymore. See the new requirements [here](./get-started).

### Migrated from pnpm to bun

Typebot is now using bun instead of pnpm as a package manager. Which means practically all deployments instructions need to be updated to now use bun.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"start-docker-compose-dev": "docker compose -f docker-compose.dev.yml up",
"build-docker-compose-prod": "docker compose -f docker-compose.build.yml build",
"start-docker-compose-prod": "docker compose -f docker-compose.yml up",
"build": "turbo build --filter=builder... --filter=viewer... --filter=landing-page...",
"build": "turbo build --filter=builder... --filter=viewer... --filter=landing-page... --filter=docs...",
"dev": "turbo dev --filter=builder... --filter=viewer...",
"generate-change-log": "git fetch --all && npx gitmoji-changelog",
"sync-locales": "tolgee sync --continue-on-warning --remove-unused --patterns './apps/builder/src/**/*.ts?(x)' --backup './.tolgee/backup'",
Expand Down
2 changes: 1 addition & 1 deletion packages/prisma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"./*": "./src/*.ts"
},
"scripts": {
"studio:start": "dotenv -e ./.env -e ../../.env -- tsx scripts/studio.ts",
"dev": "dotenv -e ./.env -e ../../.env -- tsx scripts/studio.ts",
"db:generate": "dotenv -e ./.env -e ../../.env -- tsx scripts/db-generate.ts",
"db:generate:mysql": "DATABASE_URL=mysql:// dotenv -e ./.env -e ../../.env -- tsx scripts/db-generate.ts",
"db:push": "dotenv -e ./.env -e ../../.env -- tsx scripts/db-push.ts",
Expand Down

0 comments on commit 088678b

Please sign in to comment.