Send a video URL (e.g. YouTube) => Get a blindtest
cp docker-compose.dev.yaml docker-compose.override.yaml
- Edit
docker-compose.override.yaml
file to setup your environment variables docker-compose up
- Go to http://localhost:3030 to make sure blindtester is up and running
- Create a new app with a pipeline on heroku (e.g.
MY_APP
) heroku login
heroku stack:set container --app MY_APP
heroku git:remote --app MY_APP
git push heroku master
- Go to https://dashboard.heroku.com/apps/MY_APP/settings to setup your environment variables
- Go to https://MY_APP.herokuapp.com to make sure blindtester is up and running
Produce a new blind test using the url
query param, then redirect to the blind test.
Listen to the given blind test id.
Configuration is done using environment variables (some good defaults can be found in docker-compose.dev.yaml) which are listed below:
Variable | Description |
---|---|
PORT | Port on which the web server will listen (default value is 3030 ) |
API_BASE_URL | Your blindtester installation base URL used to programmatically build links (example: http://localhost:3030 ) |
ENDPOINT_SAVE_ENABLED | If equals to true , the API will expose the save endpoint |
ENDPOINT_STREAM_ENABLED | If equals to true , the API will expose the stream endpoint |
ENDPOINT_SLACK_ENABLED | If equals to true , the API will expose special endpoints to be compatible with Slack. |
VALIDATE_MAX_FILE_DURATION_IN_SECONDS | If set, blindtester will make sure the file duration is less than this limit before downloading it. |
DATABASE_TYPE | Database type. Could be one of json (will store application data in a JSON object). |
DATABASE_JSON_TYPE | Used if DATABASE_TYPE is json . Could be one of filesystem |
DATABASE_JSON_FILESYSTEM_PATH | Used if DATABASE_JSON_TYPE is filesystem . Path to a readable/writable file which will be created (if it does not already exist) and used as database. |
DATABASE_JSON_BACKBLAZEB2_KEY_ID | Used if DATABASE_JSON_TYPE is backblazeb2 . Backblaze B2 key ID used to access the bucket containing the database. More information: b2_authorize_account |
DATABASE_JSON_BACKBLAZEB2_APPLICATION_KEY | Used if DATABASE_JSON_TYPE is backblazeb2 . Backblaze B2 application key used to access the bucket containing the database. More information: b2_authorize_account |
DATABASE_JSON_BACKBLAZEB2_BUCKET_ID | Used if DATABASE_JSON_TYPE is backblazeb2 . Backblaze B2 bucket ID where database will be stored. More information: b2_update_bucket |
DATABASE_JSON_BACKBLAZEB2_BUCKET_NAME | Used if DATABASE_JSON_TYPE is backblazeb2 . Backblaze B2 bucket name where database will be stored. More information: b2_download_file_by_name |
DATABASE_JSON_BACKBLAZEB2_FILE_NAME | Used if DATABASE_JSON_TYPE is backblazeb2 . Name of the file containing the JSON database in the bucket. More information: b2_download_file_by_name |
FILES_STORAGE_TYPE | Files storage type. Could be one of filesystem , backblazeb2 |
FILES_STORAGE_FILESYSTEM_PATH | Path to a readable/writable directory which will be created (if it does not already exist) and used to store extracted audio files |
FILES_STORAGE_BACKBLAZEB2_KEY_ID | Used if FILES_STORAGE_TYPE is backblazeb2 . Backblaze B2 key ID used to access the bucket containing the audio files. More information: b2_authorize_account |
FILES_STORAGE_BACKBLAZEB2_APPLICATION_KEY | Used if FILES_STORAGE_TYPE is backblazeb2 . Backblaze B2 application key used to access the bucket containing the audio files. More information: b2_authorize_account |
FILES_STORAGE_BACKBLAZEB2_BUCKET_ID | Used if FILES_STORAGE_TYPE is backblazeb2 . Backblaze B2 bucket ID where audio files will be stored. More information: b2_update_bucket |
SLACK_CLIENT_ID | Used if ENDPOINT_SLACK_ENABLED is true . Your Slack application "Client ID". |
SLACK_CLIENT_SECRET | Used if ENDPOINT_SLACK_ENABLED is true . Your Slack application "Client Secret". |
SLACK_VERIFICATION_TOKEN | Used if ENDPOINT_SLACK_ENABLED is true . If defined, this value must match your Slack application "Verification Token" to make sure incoming requests come from your Slack application. More information: Slack verification token |
SLACK_SLACK_BUTTON_STATE | Used if ENDPOINT_SLACK_ENABLED is true . If defined, this value must be the same as the state query param used in the request used to distribute your Slack application in a Slack workspace (e.g. https://slack.com/oauth/authorize?client_id=YOUR_SLACK_CLIENT_ID&scope=commands&state=YOUR_SLACK_SLACK_BUTTON_STATE ). More information: Slack button |
In order to be easily used in Slack, blindtester provides special endpoints.
Here's how to create a blindtester Slack application:
- Configure
ENDPOINT_SLACK_ENABLED
blindtester variable to expose Slack endpoints - Create a Slack App from your workspace
- Create a
Slash Command
for your app whereRequest URL
will point to theAPI_BASE_URL/slack-command
endpoint of your blindtester installation andEscape channels, users, and links sent to your app
will be checked Install App
to your workspace
If you want to distribute your application to other workspaces:
- Configure
SLACK_CLIENT_ID
andSLACK_CLIENT_SECRET
blindtester variables using your Slack application credentials - Add a
Redirect URL
which will point to theAPI_BASE_URL/slack-oauth-slack-button
endpoint of your blindtester installation Activate Public Distribution
- Use your
Add to Slack
button to install the app to other workspaces
cp docker-compose.dev.yaml docker-compose.override.yaml
# edit docker-compose.override.yaml file to setup your environment variables and uncomment the last lines of the file to run in "development" environment
# download "node_modules" locally for a better developer experience (smarter IDE, fix lint on commit, etc.)
cd api && npm install && cd -
docker-compose up
If you've run npm install
locally (outside of the container running the app), you should already have the "fix lint on commit" feature available.
If you want to lint your code manually:
# while docker-compose is up
docker-compose exec api npm run lint:fix
# while docker-compose is up
docker-compose exec api npm run test
GPLv3 - See LICENSE.md file.