Skip to content

Commit

Permalink
feat: support compression (#15)
Browse files Browse the repository at this point in the history
test: upgrade mongodb used by tests to 7.0.9
chore: move from kafkajs to central-services-stream
feat: new setting APPLY_SCHEMA controls is added to control if collection modification (to apply schema validator) is attempted. This validator is normally there and the collection modification requires permissions, which are not there by default.

BREAKING CHANGE: Kafka config changed to the one used by centreal-services-stream
BREAKING CHANGE: default topic changed to topic-event-audit
  • Loading branch information
kalinkrustev authored May 27, 2024
1 parent efa6c97 commit 348fe40
Show file tree
Hide file tree
Showing 13 changed files with 9,454 additions and 14,460 deletions.
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ executors:
default-docker:
working_directory: /home/circleci/project
docker:
- image: node:14
- image: node:18

default-machine:
shell: "/bin/bash -leo pipefail"
machine:
image: ubuntu-2004:202010-01
image: ubuntu-2204:2023.04.2

##
# Jobs
Expand Down
31 changes: 31 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This is a comment.
# Each line is a file pattern followed by one or more owners.
## These owners will be the default owners for everything in
## the repo. Unless a later match takes precedence,
## @global-owner1 and @global-owner2 will be requested for
## review when someone opens a pull request.
#* @global-owner1 @global-owner2
* @elnyry-sam-k @vijayg10 @oderayi @bushjames
## Order is important; the last matching pattern takes the most
## precedence. When someone opens a pull request that only
## modifies JS files, only @js-owner and not the global
## owner(s) will be requested for a review.
# *.js @js-owner
## You can also use email addresses if you prefer. They'll be
## used to look up users just like we do for commit author
## emails.
#*.go docs@example.com
# In this example, @doctocat owns any files in the build/logs
# directory at the root of the repository and any of its
# subdirectories.
# /build/logs/ @doctocat
## The `docs/*` pattern will match files like
## `docs/getting-started.md` but not further nested files like
## `docs/build-app/troubleshooting.md`.
# docs/* docs@example.com
## In this example, @octocat owns any file in an apps directory
## anywhere in your repository.
#apps/ @octocat
## In this example, @doctocat owns any file in the `/docs`
## directory in the root of your repository.
#/docs/ @doctocat
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ FROM node:18.16.0-alpine as builder
WORKDIR /opt/app

RUN apk --no-cache add git
RUN apk add --no-cache -t build-dependencies make gcc g++ python3 libtool libressl-dev openssl-dev autoconf automake \
RUN apk add --no-cache -t build-dependencies bash make gcc g++ python3 libtool openssl-dev autoconf automake \
&& cd $(npm root -g)/npm \
&& npm config set unsafe-perm true \
&& npm install -g node-gyp

COPY package.json package-lock.json* /opt/app/
Expand All @@ -23,7 +22,7 @@ RUN mkdir ./logs && touch ./logs/combined.log
RUN ln -sf /dev/stdout ./logs/combined.log

# Create a non-root user: ml-user
RUN adduser -D ml-user
RUN adduser -D ml-user
USER ml-user

COPY --chown=ml-user --from=builder /opt/app .
Expand Down
18 changes: 14 additions & 4 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,22 @@
"USER": "",
"PASSWORD": "",
"DATABASE": "reporting",
"APPLY_SCHEMA": true,
"EVENTS_COLLECTION": "reporting"
},
"KAFKA": {
"BROKER_LIST": ["localhost:9092"],
"CONSUMER_GROUP": "reporting_events_processor_consumer_group",
"CLIENT_ID": "reporting_events_processor_consumer",
"TOPIC_EVENT": "topic-event"
"TOPIC_EVENT": "topic-event-audit",
"CONSUMER": {
"EVENT": {
"config": {
"rdkafkaConf": {
"clientId": "reporting_events_processor_consumer",
"groupId": "reporting_events_processor_consumer_group",
"metadataBrokerList": "localhost:9092",
"socketKeepaliveEnable": true
}
}
}
}
}
}
2 changes: 1 addition & 1 deletion jest-mongodb-config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
mongodbMemoryServerOptions: {
binary: {
version: '5.0.3',
version: '7.0.9',
skipMD5: true
},
autoStart: false,
Expand Down
Loading

0 comments on commit 348fe40

Please sign in to comment.