Reputation: 215
All,
Currently all of our services uses different other internal services and their dependency is resolved by directly giving Bitbucket repository path of the services in the build config file (package.json).
We want to setup a local artificatory where all the internal modules will be made available and dependencies can be resolved from their than from Bitbucket directly.
Can someone give me some pointers how can I do this? What are the various steps involved?
I would set up this for production environment so what factors should I keep in mind while installation.
Upvotes: 1
Views: 9921
Reputation: 8267
I recommend you to follow this steps:
Replacing the default registry with your new local repository with this command:
npm config set registry http://<ARTIFACTORY_SERVER_DOMAIN>:8081/artifactory/api/npm/your-npm-local-repo-name
Deploy your packages to Artifactory. The first time you can upload the artifacts to artifactory manually or using this command in every project:
npm publish --registry http://<ARTIFACTORY_SERVER_DOMAIN>:8081/artifactory/api/npm/your-npm-local-repo-name
Remove Bitbucket links and replace with only the dependency name and version like:
"dependency-name1": "0.0.1",
"dependency-name2": "0.0.1",
And publish our projects without Bitbuckets links.
More info here: Npm Registry with Jfrog Artifactory
Upvotes: 2