Giter Site home page Giter Site logo

migrating to verdaccio about verdaccio HOT 13 CLOSED

verdaccio avatar verdaccio commented on May 5, 2024
migrating to verdaccio

from verdaccio.

Comments (13)

juanpicado avatar juanpicado commented on May 5, 2024 1

Just switch it, it's backwards compatible.

from verdaccio.

qballer avatar qballer commented on May 5, 2024 1

I'm running verdaccio with forever, and looks good. 10x

future ref: forever <install folder>/node_modules/.bin/verdaccio -c <data-folder>/config.yaml &

from verdaccio.

kroltan avatar kroltan commented on May 5, 2024 1

I have this issue too. Installed Verdaccio and changed the config so storage points to the same path as the old Sinopia storage, but no modules show up on the web interface, nor can I download them.

from verdaccio.

dev-rowbot avatar dev-rowbot commented on May 5, 2024 1

@juanpicado I'm away from the office so I will try remember the exact steps...

Essentially you need to setup an instance of Verdaccio 2.x (I think we are on 2.7.1 but the exact version should not matter).

Run the container as per the docker example on the homepage but add a data volume, e.g.:

docker run -it --name verdaccio -v /data/verdaccio2/storage:/verdaccio/storage -p 4873:4873 verdaccio/verdaccio:2.7.1

Set this registry as your npm registry and run an npm install so that it caches a few packages. Then publish a local package as well so that you have at least 1 package showing on the UI landing page.

Now create a 2nd verdaccio instance (you can stop the first if you need the same port) but give it a new data volume location.

docker run -it --name verdaccio -v /data/verdaccio3/storage:/verdaccio/storage -p 4873:4873 verdaccio/verdaccio:3.1.0

Copy the data from /data/verdaccio2/storage to /data/verdaccio3/storage.

rsync -avzh /data/verdaccio2/storage/ /data/verdaccio3/storage

Even after a container restart nothing will appear in the UI and publishing new packages will probably fail as well.

I noticed with our 2.x instance that the verdaccio process runs as root and the 3.1.0 instance runs as verdaccio so there are rights issues. You can fix this by changing ownership but it doesn't solve the problem for me:

docker exec -it -u root verdaccio /bin/sh
chown -R verdaccio:verdaccio /verdaccio/storage
exit

I hope this helps!

from verdaccio.

jmwilkinson avatar jmwilkinson commented on May 5, 2024

I think the question is about migrating the package history over to the running verdaccio instance? Is that correct?

from verdaccio.

Nicholaiii avatar Nicholaiii commented on May 5, 2024

If you're still in doubt, I believe you just need to move the folder from the sinopia install to the verdaccio install.

from verdaccio.

jmellor avatar jmellor commented on May 5, 2024

Nicolaiii stated:

I believe you just need to move the folder from the sinopia install to the verdaccio install.

I have a running docker instance of Sinopia and one of Verdaccio. Both have a bind mount for the storage directory. I need to migrate all the local packages to Verdaccio. I must be missing something, because copying the storage directory from Sinopia to verdaccio does not appear to actually work as described. The packages are present in storage, but not visible in the web page. What else needs to be done to successfully move from Sinopia to Verdaccio?

from verdaccio.

juanpicado avatar juanpicado commented on May 5, 2024

@jmellor I'm not able to reproduce your issue. I have one instance of Sinopia and another one for Verdaccio, both pointing the same config file and same storage folder. I published 5 modules through Sinopia and 2 from Verdaccio.

This is the storage overview
file_system
Whether I load the web UI with Sinopia, all modules published with Sinopia are displayed, but, not those published with Verdaccio.
sinopia_web
Whether I load the web UI with Verdaccio, all modules are displayed, even those published through Sinopia.
verdaccio_web

The database's content is the following, btw, Verdaccio still remains using .sinopia-db.json.

{"list":[
"crypto_test",
"crypto_test_verdaccio",
"crypto_test_sinopia",
"crypto_test_sinopia1",
"crypto_test_sinopia2",
"crypto_test_verdaccio2",
"crypto_test_sinopia_33"],
"secret":"cc1eb2ec68c4053ef6dd9b8f7e685841af0e05d822f2b4ee84894f8c851f0b3e"}

So, the unique "bug" I see by far is Sinopia is not able to display those modules published through Verdaccio, but that's irrelevant in your case.

from verdaccio.

jmellor avatar jmellor commented on May 5, 2024

from verdaccio.

dev-rowbot avatar dev-rowbot commented on May 5, 2024

I have a similar issue - migrating from docker Verdaccio 2.x to docker Verdaccio 3.1.0 on a different server.
I copied the data volumes across but the new instance does not pick up the data. I eventually wrote a script to read the locally published packages from the old .sinopia-db.json file and push each tarball to the new Verdaccio instance.

Nothing special but this may help: https://gist.github.com/dev-rowbot/38b7ad3b0e0b951598e9df144160e17f

from verdaccio.

juanpicado avatar juanpicado commented on May 5, 2024

I copied the data volumes across but the new instance does not pick up the data.

I'm not expert in Docker, but, it would be great to have a simple list steps to reproduce it. Migration should be clean, even in Docker.

from verdaccio.

juanpicado avatar juanpicado commented on May 5, 2024

@dev-rowbot ok I see you were using a quite old Verdaccio docker image. The latest 2.x were using verdaccio as the user already (https://github.com/verdaccio/verdaccio/releases/tag/v2.2.5)

from verdaccio.

lock avatar lock commented on May 5, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from verdaccio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.