-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1172 from appirio-tech/dev
Promoting Post Editor changes to production
- Loading branch information
Showing
39 changed files
with
6,268 additions
and
6,655 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Start tc-message-service | ||
|
||
Follow ``tc-message-service/local/README.md`` to setup the Discourse and tc-message-service locally. | ||
|
||
- Note the Discourse has some strict validation constraints and we can loose them for dev (For example by default Discourse has **mailinator.com** email domain in blacklist, but we'll use some test users which have **mailinator.com** email addresses). | ||
|
||
```shell | ||
# Disable the email domain blacklist by setting an empty string | ||
curl -X PUT 'http://talk.topcoder-dev.com:3002/admin/site_settings/email_domains_blacklist?api_key=<api_key>&api_username=system' -H 'content-type: application/x-www-form-urlencoded' -d email_domains_blacklist='' | ||
|
||
# Refer to tc-message-service/local/README.md for more commands to configure Discourse | ||
...... | ||
``` | ||
|
||
|
||
|
||
- Note the jwt token got from accounts.topcoder-dev.com cannot be verified locally (not knowing its secret key), so we'll use a loose auth strategy which just decodes the token without verfiying its signature. Start the tc-message-server by prepending *TC_MESSAGE_SERVICE_AUTH_LOOSE=true*: | ||
|
||
```shell | ||
TC_MESSAGE_SERVICE_AUTH_LOOSE=true npm run start:dev | ||
``` | ||
|
||
The message service will be started at 8001 port. | ||
|
||
|
||
|
||
# Configure reference lookup | ||
|
||
Login to postgres either by install psql locally, or entering the postgres docker container: | ||
|
||
```shell | ||
psql messages coder -h local.topcoder-dev.com | ||
``` | ||
|
||
And execute the following statement: | ||
|
||
```sql | ||
INSERT INTO "referenceLookups" (reference, endpoint, "createdAt", "updatedAt") VALUES ('project', 'https://api.topcoder-dev.com/v4/projects/{id}', now(), now()); | ||
``` | ||
|
||
|
||
|
||
# Start connect-app | ||
|
||
```shell | ||
CONNECT_MESSAGE_API_URL=http://localhost:8001 npm start | ||
``` | ||
|
||
The connect app will be started at 3000 port. |
Oops, something went wrong.