-
Notifications
You must be signed in to change notification settings - Fork 15
Self hosting
After spinning up a server, grab the JavaScript embed code or React component and place wherever you want it to appear on your site. (It works great at the end of your docs template - so visitors can ask questions without leaving the page. And because the questions & answers stay on your site, they'll be useful for others in the future.)
Squeak! is currently self-hosted, but we make deployment simple using a Docker container. You'll need:
- Docker and docker hosting - Runs client-side widget, admin panel
- A Supabase account - Hosted Postgres database, authentication
- Mailgun (optional) - Email notifications for users when someone answers their question
- Slack (optional) - Moderator notifications for new questions and community replies
This will take a few minutes. (We'll come back here.)
Be sure to save your database password. You'll need this later.
We've made it easy to deploy to DigitalOcean.
- On step one, choose Detect from source code
- On step 2 (environment vars), under Web, click edit, an
- Delete
SUPABASE_SERVICE_ROLE_KEY
, then re-add
Find these in Supabase at:
<https://app.supabase.io/project/{your-project-id}>
Read more about how we use these in the appendix at the bottom of this page.
This step will run database migrations when the service is started.
If you don't enter your credentials, you'll just need to copy/paste a SQL query to create the table structure.
Enter your database's password and hostname into the following string.
postgresql://postgres:{your-password}@{your-host}:5432/postgres
Find your database hostname at the following URL:
<https://app.supabase.io/project/{your-project-id}/settings/database>
Use the resulting value in the DATABASE_URL
field. (Voila, that was the hardest part!)
Something like {your-project}-squeak works great.
The deployment will take 2-4 minutes.
Using DigitalOcean? You'll need to set up billing before building. You can host with DigitalOcean for as little as $5 by choosing the Basic plan, then adjusting the Basic Size.
While Docker is building, visit the following URL:
<https://app.supabase.io/project/{your-project-id}/auth/settings>
Under Email Auth, toggle OFF
Enable email confirmations.
This will allow users to post questions without leaving the widget.
Note: This form sometimes takes a few seconds to update.
The first time you run your app, you'll be redirected to:
{your-url}.{tld}/setup/welcome
Skip this step if you added your database connection string (from step 4)
- Copy the SQL query from the setup process
- Visit the Supabase SQL Editor and choose New query
- Paste and run the SQL command
- You'll see "Success. No rows returns"
- Return to the setup process
You'll also be able to reply to questions with this authentication.
- Find your Private API key in Mailgun and enter it as the
Mailgun API key
- Enter the domain name you'll be sending from, your company name, and your site's URL (so the email can link back to it)
- Optionally, create a new Slack channel for Squeak! notifications
- Copy and replace the app manifest
- Install to workspace
- In Slack, visit the OAuth & Permissions page (at `https://api.slack.com/apps/{your-app-id}/oauth
- Copy the value of
Bot User OAuth Token
and add to the setup wizard - After entering your OAuth token, you'll be asked to select your desired Slack channel
It can be installed on a single page template, or in a snippet references across your site like a layout template.
Note: If you use React, install the squeak-react
package instead with yarn add squeak-react
Find the values for these keys in your Supabase project.