-
Notifications
You must be signed in to change notification settings - Fork 7
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 #56 from paralect/v3
Update node-mongo
- Loading branch information
Showing
40 changed files
with
3,195 additions
and
2,176 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
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,9 +1,44 @@ | ||
module.exports = { | ||
extends: 'airbnb-base', | ||
root: true, | ||
parser: "@typescript-eslint/parser", | ||
plugins: [ | ||
"@typescript-eslint" | ||
], | ||
extends: [ | ||
"airbnb-typescript/base", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
parserOptions: { | ||
ecmaVersion: 2018, | ||
sourceType: "module", | ||
project: "./tsconfig.json", | ||
// use tsconfig relative to eslintrc file for IDE | ||
tsconfigRootDir: __dirname | ||
}, | ||
rules: { | ||
'no-underscore-dangle': 0, | ||
// mongodb has _id | ||
"no-underscore-dangle": "off", | ||
"no-param-reassign": "off", | ||
"import/prefer-default-export": "warn" | ||
}, | ||
env: { | ||
mocha: true, | ||
settings: { | ||
"import/resolver": { | ||
"node": { | ||
"moduleDirectory": [ | ||
"src", | ||
"node_modules" | ||
] | ||
} | ||
} | ||
}, | ||
}; | ||
ignorePatterns: [ | ||
// ignore this file | ||
".eslintrc.js", | ||
// never lint node modules | ||
"node_modules", | ||
// ignore prod_node_modules copied in Docker | ||
"prod_node_modules", | ||
// ignore output build files | ||
"dist" | ||
] | ||
} |
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ node_modules | |
.idea/ | ||
coverage | ||
.DS_Store | ||
dist/ |
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,11 @@ | ||
FROM node:16.13.1-alpine3.13 | ||
|
||
WORKDIR /app | ||
COPY ["package*.json", "/app/"] | ||
RUN npm ci --quiet | ||
|
||
COPY . . | ||
|
||
RUN npm run build | ||
|
||
CMD npm run all |
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,2 @@ | ||
#!/bin/sh | ||
docker-compose -f docker-compose.tests.yml up --build |
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,52 @@ | ||
version: '3.6' | ||
services: | ||
mongo: | ||
container_name: mongo | ||
image: mongo:4.4 | ||
command: --replSet rs --bind_ip_all --keyFile /mongo-replicator/keyfile | ||
environment: | ||
- MONGO_INITDB_ROOT_USERNAME=root | ||
- MONGO_INITDB_ROOT_PASSWORD=root | ||
networks: | ||
- node-mongo-tests | ||
ports: | ||
- 27017:27017 | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- ./mongo-replicator:/mongo-replicator | ||
- type: volume | ||
source: mongodb | ||
target: /data/db | ||
- type: volume | ||
source: mongodb-cfg | ||
target: /data/configdb | ||
mongo-replicator: | ||
container_name: mongo-replicator | ||
build: ./mongo-replicator | ||
environment: | ||
- HOST=mongo | ||
- PORT=27017 | ||
- USERNAME=root | ||
- PASSWORD=root | ||
- REPLICA_SET_NAME=rs | ||
networks: | ||
- node-mongo-tests | ||
depends_on: | ||
- mongo | ||
tests: | ||
container_name: tests | ||
build: | ||
context: . | ||
dockerfile: ./Dockerfile.tests | ||
networks: | ||
- node-mongo-tests | ||
depends_on: | ||
- mongo-replicator | ||
|
||
networks: | ||
node-mongo-tests: | ||
name: node-mongo-tests-network | ||
|
||
volumes: | ||
mongodb: | ||
mongodb-cfg: |
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,3 @@ | ||
FROM mongo:4.4 | ||
ADD ./setup.sh /setup.sh | ||
CMD ["/setup.sh"] |
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,16 @@ | ||
eATfKkkUG4tSqfr3dJiRruI6QBYBzxhBBMVu4f8IoMQ8Hmf9GC9/6/TRvdk7mt4p | ||
z8MccxDRBqGgpAoMOyosUGZxprnJjzNSRKgofRgT9YE4mopMGB4nsRMRS+PR5o6v | ||
YlUSKrK/rrsKF+ogBKn350S1328aBaucjEuajsL5lMlt+wuqRvRVo4SzPizLhXuv | ||
W2Y31+7Yex4V8AmEfs5h0wPDEzsdAdifgW4Io6A6pX17tJkVRW+DkLYNEu9laquF | ||
L6+S5vFYO7Rv85GhBeSFGSgj0Sqchj3UhkPoy7R17nKfAmeF0m6H1WEPw0iFk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