Make sure you have a domain(or subdomain) and SSH access to an instance. This works well under a DigitalOcean's Ubuntu with Docker and Docker Compose installed.
- Set in
docker-compose.yml
andssl_gen.sh
the DOMAIN=my.registry.com on the Nginx args. - Delete all DELETE_ME.yml files in
certs
,certs-data
,verdaccio/storage
(keep folders). docker-compose up -d
chmod +x *.sh && ./ssl_gen.sh
- After it succeeds, start it with
docker-compose restart
You should be able to access the registry via https://...
Verdaccio uses htpasswd for user management
- http://www.htaccesstools.com/htpasswd-generator/
- copy the output to the file
./verdaccio/conf/htpasswd
- npm login --registry http://my.registry.com
This will schedule a renewal of the SSL cert with Let's Encrypt every 15 days.
crontab -u $USER -e
0 0 */15 * * /path/to/registry_files/ssl_renew.sh
- Is there a DNS A record pointing to the server?
- Are you using registry.com? (use your own)
- If let's encrypt fails, delete all certs and certs-data files and try again.
- In order for the container to write to the host's filesystem, The verdaccio.dockerfile run as
root
(mainly for persistingstorage
folder. - No warranties, provided as is.