-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(apis-engagement): Minor updates around docker files and api spec
- Loading branch information
1 parent
ddde068
commit 649a2ce
Showing
12 changed files
with
192 additions
and
23 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
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
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,15 @@ | ||
version: "3.9" | ||
|
||
services: | ||
apis-engagement: | ||
environment: | ||
- NODE_ENV=development | ||
- ASPNETCORE_ENVIRONMENT=Development | ||
- ServiceConfig__Id=EngagementService.Api-9100 | ||
- ServiceConfig__Name=EngagementService | ||
- ServiceConfig__DiscoveryAddress=http://consul:8500 | ||
- ServiceConfig__Address=apis-engagement | ||
- ServiceConfig__Port=80 | ||
- ServiceConfig__HealthCheckEndPoint=health-check | ||
ports: | ||
- 9100:80 |
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,19 @@ | ||
version: "3.9" | ||
|
||
services: | ||
apis-engagement: | ||
container_name: apis-engagement | ||
image: apis-engagement:latest | ||
restart: on-failure | ||
hostname: apis-engagement | ||
build: | ||
context: . | ||
dockerfile: apps/apis/engagement/Dockerfile | ||
environment: | ||
NODE_ENV: development | ||
networks: | ||
- common_network | ||
|
||
networks: | ||
common_network: | ||
driver: bridge |
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,105 @@ | ||
{ | ||
"asyncapi": "2.5.0", | ||
"info": { | ||
"title": "Engagement Service", | ||
"version": "1.0.0", | ||
"description": "This service is in charge of processing system engagement data", | ||
"termsOfService": "https://sullivanpj.com/terms", | ||
"contact": { | ||
"name": "Patrick Sullivan", | ||
"url": "https://sullivanpj.com", | ||
"email": "Patrick.Joseph.Sullivan@ProtonMail.com" | ||
}, | ||
"license": { | ||
"name": "BSD 2-Clause License", | ||
"url": "https://opensource.org/licenses/BSD-2-Clause" | ||
} | ||
}, | ||
"defaultContentType": "json", | ||
"servers": { | ||
"development": { | ||
"url": "http://localhost:5100/services/engagement", | ||
"description": "Local development server", | ||
"protocol": "amqp", | ||
"protocolVersion": "0.9.1" | ||
}, | ||
"production": { | ||
"url": "https://sullivanpj.com/services/engagement", | ||
"description": "Cloud-based production environment", | ||
"protocol": "amqp", | ||
"protocolVersion": "0.9.1" | ||
} | ||
}, | ||
"channels": { | ||
"reaction/add": { | ||
"subscribe": { | ||
"operationId": "onAddReactionReceived", | ||
"message": { | ||
"name": "ReactionModel", | ||
"payload": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"userId": { | ||
"type": "string", | ||
"example": "A unique Id used to identify the the current user" | ||
}, | ||
"contentId": { | ||
"type": "string", | ||
"example": "A unique Id used to identify the content the user is reacting to" | ||
}, | ||
"contentType": { | ||
"type": "string", | ||
"enum": ["article", "comment"] | ||
}, | ||
"reactionType": { | ||
"type": "string", | ||
"enum": ["like", "dislike", "happy", "sad", "laugh", "cry"] | ||
} | ||
} | ||
} | ||
}, | ||
"bindings": { | ||
"amqp": { | ||
"is": "routingKey", | ||
"exchange": { "name": "reaction", "type": "topic", "vhost": "/" }, | ||
"queue": { "name": "engagement" } | ||
} | ||
} | ||
}, | ||
"publish": { | ||
"operationId": "sendAddReaction", | ||
"message": { | ||
"name": "ReactionModel", | ||
"payload": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"userId": { | ||
"type": "string", | ||
"example": "A unique Id used to identify the the current user" | ||
}, | ||
"contentId": { | ||
"type": "string", | ||
"example": "A unique Id used to identify the content the user is reacting to" | ||
}, | ||
"contentType": { | ||
"type": "string", | ||
"enum": ["article", "comment"] | ||
}, | ||
"reactionType": { | ||
"type": "string", | ||
"enum": ["like", "dislike", "happy", "sad", "laugh", "cry"] | ||
} | ||
} | ||
} | ||
}, | ||
"bindings": { | ||
"amqp": { | ||
"ack": false | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1 +1 @@ | ||
export * from "./lib/engagement-config"; | ||
export * from "./engagement.amqp-spec.json"; |
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
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