* refactor: removed unused subscription code
* refactor: removed management api's
* refactor: cleanup of connections
* refactor: refactored comments edge
* refactor: simplified connection resolving
* feat: added story connection edge
* fix: added story index
* feat: added user pagination and user edge
* fix: added filter to comment query
* fix: removed unused resolvers
* fix: creating a comment reply should require auth
* refactor: cleanup of graph files
* feat: removed display name, made username non-unique
* fix: fixed tests
* fix: fixed tests
* fix: added more api docs
* fix: fixed bug with installer
* refactor: fixes and updates
* fix: added linting for graphql, fixed schema
* feat: added docker build tests
* fix: upped output timeout
* fix: fixed stacktraces in production builds
* fix: removed `git add`
- `git add` was causing issues with
partial staged changs on files
* feat: improved error messaging for auth
* refactor: cleaned up queue names
* fix: merge error
talk
Requirements
- MongoDB >=3.6
- Redis >=3.2
- NodeJS >=10
- NPM >=6.7
Running
You can install Talk using Docker or via Source. We recommend Docker, as it
provides the easiest deployment solution going forward, as all the dependencies
are baked and shipped with the provided
coralproject/talk:next image.
When v5 releases to master, you'll be able to select it using
coralproject/talk:5.
Docker
The easiest way to get started with Talk is through our published Docker image
and provided example docker-compose.yml file. The following assumes that you
have Docker and Docker Compose installed on your local machine:
- Install Docker: https://docs.docker.com/install/
- Install Docker Compose: https://docs.docker.com/compose/install/ (this is typically included in the Docker Desktop editions already)
# Create directories to persist the data in MongoDB and Redis.
mkdir -p data/{mongo,redis}
# Create the `docker-compose.yml` file to get started.
cat > docker-compose.yml <<EOF
version: "2"
services:
talk:
image: coralproject/talk:next
restart: always
ports:
- "127.0.0.1:3000:5000"
depends_on:
- mongo
- redis
environment:
- MONGODB_URI=mongodb://mongo:27017/talk
- REDIS_URI=redis://redis:6379
- SIGNING_SECRET=<replace me with something secret>
mongo:
image: mongo:3.6
volumes:
- ./data/mongo:/data/db
redis:
image: redis:3.2
volumes:
- ./data/redis:/data
EOF
# Start up Talk using Docker.
docker-compose up -d
Then head on over to http://127.0.0.1:3000 to install Talk!
Source
Talk requires NodeJS >=10, we recommend using nvm to help manage node
versions: https://github.com/creationix/nvm.
# Install dependencies.
npm install
# Build the application dependencies.
npm run build
This should output all the compiled application code to ./dist.
Running Talk with default settings assumes that you have:
- MongoDB >=3.6 running on
127.0.0.1:27017 - Redis >=3.2 running on
127.0.0.1:6379
If you don't already have these databases running, you can run the following assuming you have Docker installed on your local machine:
docker run -d -p 27017:27017 --restart always --name mongo mongo:3.6
docker run -d -p 6379:6379 --restart always --name redis redis:3.2
Then start Talk with:
# Start the server in production mode.
npm run start
Then head on over to http://127.0.0.1:3000 to install Talk!
Configuration
The following environment variables can be set to configure the Talk Server:
NODE_ENV- Can be one ofproductionordevelopment. All production deployments should useproduction. Defaults toproductionwhen ran withnpm run startanddevelopmentwhen run withnpm run start:development.PORT- The port to listen for HTTP and Websocket requests. (Default3000)MONGODB_URI- The MongoDB database URI to connect to. (Defaultmongodb://127.0.0.1:27017/talk)REDIS_URI- The Redis database URI to connect to. (Defaultredis://127.0.0.1:6379)SIGNING_SECRET- The shared secret to use to sign JSON Web Tokens (JWT) with the selected signing algorithm. (Default:keyboard cat)SIGNING_ALGORITHM- The signing algorithm to use for signing JWT's. (DefaultHS256).LOGGING_LEVEL- The logging level that can be set to one offatal,error,warn,info,debug, ortrace. (Defaultinfo)STATIC_URI- The URI that static assets can be accessed from. This URI can be to a proxy that uses this Talk server onPORTas the upstream. Disabled by default.DISABLE_TENANT_CACHING- Whentrue, all tenants will be loaded from the database when needed rather than keeping a in-memory copy in sync via published events on Redis. (Defaultfalse)DISABLE_MONGODB_AUTOINDEXING- Whentrue, Talk will not perform indexing operations when it starts up. This can be desired when you've already installed Talk on the target MongoDB, but want to improve start performance. (Defaultfalse)LOCALE- Specify the default locale to use for all requests without a locale specified. (Defaulten-US)ENABLE_GRAPHIQL- Whentrue, it will enable the/graphiqleven in production, use with care. (Defaultfalse)CONCURRENCY- The number of worker nodes to spawn to handle web traffic, this should be tied to the number of CPU's available. (Defaultos.cpus().length)DEV_PORT- The port where the Webpack Development server is running on. (Default8080)
License
Talk is released under the Apache License, v2.0.