matteofigus on master
0.48.18 changelog (compare)
matteofigus on master
0.48.18 changelog (compare)
matteofigus on v0.48.18
matteofigus on v0.48.18
matteofigus on master
Add support for custom keepAliv… Merge pull request #1184 from d… (compare)
matteofigus on master
Add support for custom keepAliv… Merge pull request #1184 from d… (compare)
error occurred when publishing to a registry {}
@matteofigus Hi! We use SSR only and I think I'll need to use you suggestion and override public part. So after in my server.js I should have something like this when I use storage adapter?
const oc = require('oc');
const s3 = require('oc-s3-storage-adapter');
let config = {
baseUrl: 'my url',
port: 3000,
refreshInterval: 600,
pollingInterval: 5,
templates: [require('oc-template-jade')],
storage: {
adapter: s3,
options: {
key: 'my key',
secret: 'my secret',
bucket: 'my bucket name',
region: 'us-east-2',
componentsDir: 'components',
sslEnabled: false,
s3ForcePathStyle: true,
path - > ??
debug: true,
endpoint: 'http://localhost:8080'
}
},
env: { name: 'production' }
};
let registry = new oc.Registry(config);
registry.start(function(err, app){
if(err) {
console.log('Registry not started: ', err);
process.exit(1);
}
});
I was looking for some documentation for storage adapters, maybe you have some examples? The most part is self explanatory, but maybe I'll miss something accidentally or I need more configuration under 'options'...
client.renderComponents()
but it makes rendering a little slower, so I hope I'm on the right track because I don't have any other option in my mind.@kmcrawford wow thank you! I'm trying to do something like that in NodeJS and express.js router, so far can't get through access denied message.
My initial idea was to do following:
const AWS = require('aws-sdk')
const s3 = new AWS.S3()
AWS.config.update({accessKeyId: 'id', secretAccessKey: 'key'})
const myBucket = 'bucket-name'
const signedUrlExpireSeconds = 60 * 5 <-- just a test
const url = s3.getSignedUrl('getObject', {
Bucket: myBucket,
Key: "/",
Expires: signedUrlExpireSeconds
})
console.log(url)
And then pass it to the client = to have something like that:const client = new Client({
registries: {
serverRendering: pre-signed url here <---
},
})
maybe I'm on the wrong track, will see
POST https://oc-registry.com -H "Accept: application/vnd.oc.info+json"
{
components: [{
name: 'component1',
version: '1.X.X'
}, {
name: 'component2',
version: '~1.2.4'
}]
}
oc dev ../components 3000
and put my test component in the components
dir.oc registry add http://localhost:3000
i get this error:not a valid oc registry
GET / 200 0.514 ms - 160
Hello I am trying to understand how Registry Rest API works . Tried to follow the documentation at https://github.com/opencomponents/oc/wiki/Registry . I am bit puzzled about how the registry will work if I want to host the registry in a AWS ECS (EC2) instance.
@shinup after deploying the registry, you should have a base url you can use with the CLI. An easy way to get started with AWS is to use docker for the registry and use Elastic Beanstalk - an example of a container https://github.com/ciricihq/oc-docker
2021-03-15T20:23:45.713168+00:00 app[web.1]: > opencomponents-starter-kit@1.0.0 start /app
2021-03-15T20:23:45.713169+00:00 app[web.1]: > node server.js
2021-03-15T20:23:45.713169+00:00 app[web.1]:
2021-03-15T20:23:49.694652+00:00 app[web.1]: Registry not started: components_list_save
2021-03-15T20:23:49.842166+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-03-15T20:23:49.844844+00:00 app[web.1]: npm ERR! errno 1
2021-03-15T20:23:49.887172+00:00 app[web.1]: npm ERR! opencomponents-starter-kit@1.0.0 start:
node server.js`