-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(verdaccio-aws-s3-storage): separate s3 subfolders (key prefix fo…
…r different packages) (#313) * test: createPackage with s3 mock * feat: Add Custom Storage Remove packagename as key for s3 objects Add package path from custom storage of packages * test: Add number of assertions to tests * refactor: trailing slash function remove the duplications in trailing slash on paths * chore: add data to gitignore this folder is used per convention for minio or localstack for database * fix: replace s3config with whole config this is to access the packages and their store key * Add readme section * fix: jest registry in yarn.lock * Upgrade: aws-sdk aws-s3-storage plugin * fix: set minio endpoint in config.yaml * fix: Remove registry.env file from repo Update the README * Fix: aws secret access key example in README * Add npmignore
- Loading branch information
1 parent
21c47d3
commit 6639a71
Showing
12 changed files
with
600 additions
and
18 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,2 +1,3 @@ | ||
lib/ | ||
node_modules/ | ||
data |
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 @@ | ||
./conf | ||
Dockerfile | ||
docker-compose.yaml |
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,17 @@ | ||
FROM verdaccio/verdaccio:4 | ||
|
||
USER root | ||
|
||
ENV NODE_ENV=production | ||
|
||
RUN apk --no-cache add openssl ca-certificates wget && \ | ||
apk --no-cache add g++ gcc libgcc libstdc++ linux-headers make python && \ | ||
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \ | ||
wget -q https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.25-r0/glibc-2.25-r0.apk && \ | ||
apk add glibc-2.25-r0.apk | ||
|
||
RUN npm i | ||
|
||
COPY . ./build/plugins/aws-s3-storage/ | ||
|
||
USER verdaccio |
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,43 @@ | ||
storage: /verdaccio/storage | ||
|
||
plugins: plugins | ||
|
||
store: | ||
aws-s3-storage: | ||
bucket: rise | ||
keyPrefix: verdaccio | ||
region: eu-central-1 | ||
endpoint: http://minio:9000 | ||
accessKeyId: foobar | ||
secretAccessKey: 1234567e | ||
s3ForcePathStyle: true | ||
|
||
uplinks: | ||
npmjs: | ||
url: https://registry.npmjs.org/ | ||
cache: false | ||
|
||
packages: | ||
'@rise/*': | ||
access: all | ||
publish: $all | ||
storage: 'private' | ||
'@*/*': | ||
access: $all | ||
publish: $all | ||
proxy: npmjs | ||
storage: 'public' | ||
'**': | ||
access: $all | ||
publish: $all | ||
proxy: npmjs | ||
storage: 'public' | ||
logs: | ||
- {type: stdout, format: pretty, level: trace} | ||
|
||
listen: | ||
- 0.0.0.0:4873 | ||
|
||
auth: | ||
htpasswd: | ||
file: ./htpasswd |
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,24 @@ | ||
version: '3.7' | ||
|
||
services: | ||
minio: | ||
image: minio/minio | ||
restart: always | ||
command: server /data | ||
environment: | ||
MINIO_ACCESS_KEY: 'foobar' | ||
MINIO_SECRET_KEY: '1234567e' | ||
ports: | ||
- 9000:9000 | ||
volumes: | ||
- ./data/minio:/data | ||
|
||
verdaccio: | ||
container_name: verdaccio | ||
build: . | ||
env_file: | ||
- registry.env | ||
volumes: | ||
- ./conf:/verdaccio/conf | ||
ports: | ||
- 4873:4873 |
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,3 @@ | ||
export default (path?: string): string => { | ||
return path != null ? (path.endsWith('/') ? path : `${path}/`) : ''; | ||
}; |
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
Oops, something went wrong.