Skip to content

Commit

Permalink
feat: update self-hosting documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dahal committed May 19, 2024
1 parent 8a8c59b commit a6f7391
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
38 changes: 37 additions & 1 deletion SELF-HOSTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,27 @@ UPLOAD_BUCKET_PUBLIC="public-bucket-name"
UPLOAD_BUCKET_PRIVATE="private-bucket-name"
```

- **Run the docker container**:

```bash
docker run -d \
-e NODE_ENV="replace" \
-e DATABASE_URL="replace" \
-e NEXTAUTH_SECRET="replace" \
-e NEXTAUTH_URL="replace" \
-e NEXT_PUBLIC_BASE_URL="replace" \
-e EMAIL_FROM="replace" \
-e EMAIL_SERVER="replace" \
-e UPLOAD_REGION="replace" \
-e UPLOAD_ENDPOINT="replace" \
-e UPLOAD_ACCESS_KEY_ID="replace" \
-e UPLOAD_SECRET_ACCESS_KEY="replace" \
-e UPLOAD_BUCKET_PUBLIC="replace" \
-e UPLOAD_BUCKET_PRIVATE="replace" \
-p 3000:3000 \
captable/captable
```

- **Setup CORS for file uploads**:\
Some of the services including Cloudflare R2 may require you to setup CORS for file uploads.\

Expand All @@ -62,4 +83,19 @@ UPLOAD_BUCKET_PRIVATE="private-bucket-name"
]
}
]
```
```

- **Run database migrations**:

```bash
docker exec -it <container_id> npx prisma migrate deploy
```

<!-- Ready -->
- **Access the application**:\
Open your browser and navigate to `https://your-domain.com`

- **Questions?**\
If you have any questions, please schedule a call with us, and we will help you set up your own instance.

<a href="https://captable.inc/schedule/"><img alt="Book us" src="https://cal.com/book-with-cal-dark.svg" /></a>
2 changes: 1 addition & 1 deletion fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cpus = 1

[deploy]
strategy = "canary"
release_command = "sh ./scripts/migrate.sh"
# release_command = "sh ./scripts/migrate.sh"

[env]
NODE_ENV = "production"

0 comments on commit a6f7391

Please sign in to comment.