-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7561670
commit 0b9052d
Showing
24 changed files
with
4,621 additions
and
7,638 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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
** | ||
|
||
!package*.json | ||
!tsconfig.json | ||
|
||
!src | ||
!config | ||
|
||
config/local.json | ||
** | ||
|
||
!package.json | ||
!yarn.lock | ||
!tsconfig.json | ||
|
||
!src | ||
!config | ||
|
||
config/local.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Editor configuration, see http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
end_of_line = lf | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
module.exports = { | ||
env: { | ||
es2022: true, | ||
node: true, | ||
}, | ||
extends: [ | ||
"standard", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:typescript-sort-keys/recommended", | ||
], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
ecmaVersion: "latest", | ||
sourceType: "module", | ||
}, | ||
plugins: [ | ||
"@typescript-eslint", | ||
"simple-import-sort", | ||
"typescript-sort-keys", | ||
"unused-imports", | ||
], | ||
root: true, | ||
overrides: [ | ||
{ | ||
files: ["*.ts"], | ||
rules: { "@typescript-eslint/explicit-function-return-type": "warn" }, | ||
}, | ||
], | ||
rules: { | ||
"@typescript-eslint/consistent-type-definitions": ["error", "type"], | ||
"@typescript-eslint/no-unused-vars": "error", | ||
indent: ["error", 2, { ignoredNodes: ["PropertyDefinition"] }], | ||
"arrow-body-style": "off", | ||
"comma-dangle": ["error", "always-multiline"], | ||
"import/first": "error", | ||
"import/newline-after-import": "error", | ||
"import/no-duplicates": "error", | ||
// "max-len": ["error", { code: 100 }], | ||
"no-useless-constructor": "off", | ||
"simple-import-sort/exports": "error", | ||
"simple-import-sort/imports": "error", | ||
"space-before-function-paren": ["error", "always"], | ||
"unused-imports/no-unused-imports": "error", | ||
"unused-imports/no-unused-vars": "error", | ||
camelcase: "off", | ||
quotes: ["error", "double"], | ||
semi: ["error", "always"], | ||
"key-spacing": ["error", { | ||
singleLine: { | ||
beforeColon: false, | ||
afterColon: true, | ||
}, | ||
}], | ||
}, | ||
}; |
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,29 +1,23 @@ | ||
FROM node:19-alpine as builder | ||
|
||
WORKDIR /app | ||
|
||
COPY package*.json . | ||
|
||
RUN npm install | ||
|
||
COPY . . | ||
|
||
RUN npm run build | ||
|
||
### | ||
|
||
FROM node:19-alpine | ||
|
||
WORKDIR /app | ||
|
||
COPY package*.json . | ||
|
||
RUN npm install | ||
|
||
RUN mkdir src | ||
COPY --from=builder /app/dist src/ | ||
COPY config config | ||
|
||
USER node | ||
|
||
CMD node src/index.js | ||
FROM node:19-alpine as builder | ||
|
||
WORKDIR /app | ||
COPY package.json yarn.lock . | ||
RUN yarn | ||
COPY . . | ||
RUN npm run build | ||
|
||
### | ||
|
||
FROM node:19-alpine | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json yarn.lock . | ||
RUN yarn install --production | ||
RUN mkdir src | ||
COPY --from=builder /app/dist src/ | ||
COPY config config | ||
|
||
USER node | ||
|
||
CMD node src/index.js |
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,7 +1,17 @@ | ||
# s3-prometheus-exporter | ||
|
||
## Docker | ||
|
||
``` | ||
docker pull tchoupinax/s3-prometheus-exporter | ||
``` | ||
# s3-prometheus-exporter | ||
|
||
## Docker | ||
|
||
``` | ||
docker pull tchoupinax/s3-prometheus-exporter | ||
``` | ||
|
||
## Configuration | ||
|
||
|
||
`S3_ACCESS_KEY`: | ||
`S3_BUCKET_NAME`: The name of the bucket to watch | ||
`S3_ENDPOINT`: | ||
`PORT`: The port on which the server listens | ||
`S3_PREFIXES`: The prefix of files to watch. You can provide a list separataed by a comma. (e.g `prefix1,prefix2`) | ||
`S3_SECRET_KEY`: |
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,8 +1,8 @@ | ||
{ | ||
"port": "PORT", | ||
"accessKey": "S3_ACCESS_KEY", | ||
"secretKey": "S3_SECRET_KEY", | ||
"bucket": "S3_BUCKET_NAME", | ||
"endpoint": "S3_ENDPOINT", | ||
"port": "PORT", | ||
"prefixes": "S3_PREFIXES", | ||
"endpoint": "S3_ENDPOINT" | ||
"secretKey": "S3_SECRET_KEY" | ||
} |
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,12 +1,12 @@ | ||
{ | ||
"port": 6004, | ||
"accessKey": "minio", | ||
"secretKey": "minio", | ||
"bucket": "minio", | ||
"prefixes": "default", | ||
"endpoint": "http://s3.fr-par.scw.cloud", | ||
"logger": { | ||
"level": "debug", | ||
"pretty": true | ||
} | ||
}, | ||
"port": 6004, | ||
"prefixes": "default", | ||
"secretKey": "minio" | ||
} |
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,16 +1,16 @@ | ||
version: '3' | ||
services: | ||
minio: | ||
image: quay.io/minio/minio:RELEASE.2022-04-12T06-55-35Z | ||
command: server /data --console-address ":9001" | ||
ports: | ||
- "9000:9000" | ||
- "9001:9001" | ||
environment: | ||
MINIO_ROOT_USER: adminminio | ||
MINIO_ROOT_PASSWORD: adminminio | ||
healthcheck: | ||
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] | ||
interval: 30s | ||
timeout: 20s | ||
retries: 3 | ||
version: '3' | ||
services: | ||
minio: | ||
image: quay.io/minio/minio:RELEASE.2022-04-12T06-55-35Z | ||
command: server /data --console-address ":9001" | ||
ports: | ||
- "9000:9000" | ||
- "9001:9001" | ||
environment: | ||
MINIO_ROOT_USER: adminminio | ||
MINIO_ROOT_PASSWORD: adminminio | ||
healthcheck: | ||
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] | ||
interval: 30s | ||
timeout: 20s | ||
retries: 3 |
Oops, something went wrong.