I have encountered a sneaky un-documented breaking change migrating from my private Verdaccio registry from v3 to v4.
After migration, the v4 is not loading the existing storage content that is define in a docker volume as it was done for v3. After login the list of libraries is empty.
I have found this thread from github about this issue, but none of the proposed solution solves my problem : https://github.com/verdaccio/verdaccio/issues/1324
I am using docker-compose to load verdaccio from docker hub and the docker-compose file is the followig (works perfectly with v3) :
version: "2"
services:
verdaccio:
image: verdaccio/verdaccio:3.13
container_name: verdaccio
ports:
- "4873:4873"
volumes:
- verdaccio_data:/verdaccio
volumes:
verdaccio_data:
external: true
Following the proposed solutions in the github thread, I have tried to define a docker volume per folder as :
version: "3"
services:
verdaccio:
image: verdaccio/verdaccio:4.13
container_name: verdaccio
ports:
- "4873:4873"
volumes:
- verdaccio_data_conf:/verdaccio/conf
- verdaccio_data_storage:/verdaccio/storage
volumes:
verdaccio_data_conf:
external: true
verdaccio_data_storage:
external: true
With this approach Verdaccio is not even loading, the config.yaml is not found.
I have checked all env variables and the config.yaml is correct, I am looking for another aproach that can solve this issue when using docker compose.
Thanks a lot!
There is a few changes to take into account while migrating from Verdaccio 3 to Verdaccio 5 version.
On this regard the change that is affecting that case is the different way that volumes are set now. Volumes have been splitted into conf, storage and plugins and the prefix data is not present, so the config must look like this:
version: "2"
services:
verdaccio:
image: verdaccio/verdaccio:5
container_name: verdaccio
ports:
- "4873:4873"
volumes:
- verdaccio_conf:/verdaccio/conf
- verdaccio_storage:/verdaccio/storage
- verdaccio_plugins:/verdaccio/plugins
environment:
- VERDACCIO_PUBLIC_URL=https://yourpublicurl.com
volumes:
verdaccio_conf:
external: true
verdaccio_storage:
external: true
verdaccio_plugins:
external: true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With