mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-30 22:34:10 -05:00
migrate docker-https-portal example from V4 to V6 (#2687)
This commit is contained in:
parent
24b9be0202
commit
29b1d59b56
8 changed files with 5084 additions and 0 deletions
|
@ -5,3 +5,4 @@
|
||||||
- [Docker + Nginx + Verdaccio](reverse_proxy/nginx/README.md)
|
- [Docker + Nginx + Verdaccio](reverse_proxy/nginx/README.md)
|
||||||
- [Docker + Apache + Verdaccio](apache-verdaccio/README.md)
|
- [Docker + Apache + Verdaccio](apache-verdaccio/README.md)
|
||||||
- [Docker + Local Storage Volume + Verdaccio](docker-local-storage-volume/README.md)
|
- [Docker + Local Storage Volume + Verdaccio](docker-local-storage-volume/README.md)
|
||||||
|
- [Docker + HTTPS Portal + Verdaccio](https-portal-example/README.md)
|
||||||
|
|
69
docker-examples/v6/https-portal-example/README.md
Normal file
69
docker-examples/v6/https-portal-example/README.md
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
# Verdaccio and https-portal Example
|
||||||
|
|
||||||
|
Run `verdaccio` under fully automated HTTPS server powered by Nginx, Let's Encrypt was never so easy. Using [https-portal](https://github.com/SteveLTN/https-portal) all is builtin and no need for extra configuration.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
In order to make it work, this is just a local setup, so you must update your `host` file.
|
||||||
|
|
||||||
|
On Mac
|
||||||
|
|
||||||
|
```
|
||||||
|
➜ sudo vi /etc/hosts
|
||||||
|
|
||||||
|
##
|
||||||
|
# Host Database
|
||||||
|
#
|
||||||
|
# localhost is used to configure the loopback interface
|
||||||
|
# when the system is booting. Do not change this entry.
|
||||||
|
##
|
||||||
|
127.0.0.1 localhost
|
||||||
|
127.0.0.1 example.com
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
To run the containers, run the followingcommands in this folder, it should start the containers in detach mode.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
To recreate the nginx image you can force the build.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose up --build -d
|
||||||
|
```
|
||||||
|
|
||||||
|
To force recreate the images.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose up --build --force-recreate -d
|
||||||
|
```
|
||||||
|
|
||||||
|
To stop all containers
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose stop
|
||||||
|
```
|
||||||
|
|
||||||
|
From your Javascript project
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm publish --registry https://example.com
|
||||||
|
```
|
||||||
|
|
||||||
|
## NPM and self-signed certificates
|
||||||
|
|
||||||
|
Be aware of disabling strict SSL in `./npmrc`config file as explained [here](https://stackoverflow.com/questions/9626990/receiving-error-error-ssl-error-self-signed-cert-in-chain-while-using-npm).
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm config set strict-ssl false
|
||||||
|
```
|
||||||
|
|
||||||
|
## Login
|
||||||
|
|
||||||
|
If you want to login into the Verdaccio instance created via these Docker Examples, please try:
|
||||||
|
|
||||||
|
Username: jpicado
|
||||||
|
Password: jpicado
|
28
docker-examples/v6/https-portal-example/conf/config.yaml
Normal file
28
docker-examples/v6/https-portal-example/conf/config.yaml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
plugins: /verdaccio/plugins
|
||||||
|
storage: /verdaccio/storage
|
||||||
|
|
||||||
|
auth:
|
||||||
|
htpasswd:
|
||||||
|
file: /verdaccio/conf/htpasswd
|
||||||
|
|
||||||
|
uplinks:
|
||||||
|
npmjs:
|
||||||
|
url: https://registry.npmjs.org/
|
||||||
|
|
||||||
|
middlewares:
|
||||||
|
audit:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
packages:
|
||||||
|
'@*/*':
|
||||||
|
access: $all
|
||||||
|
publish: $all
|
||||||
|
proxy: npmjs
|
||||||
|
|
||||||
|
'**':
|
||||||
|
access: $all
|
||||||
|
publish: $all
|
||||||
|
proxy: npmjs
|
||||||
|
|
||||||
|
logs:
|
||||||
|
- { type: stdout, format: pretty, level: trace }
|
1
docker-examples/v6/https-portal-example/conf/htpasswd
Normal file
1
docker-examples/v6/https-portal-example/conf/htpasswd
Normal file
|
@ -0,0 +1 @@
|
||||||
|
jpicado:$6vkdNgRX2npc:autocreated 2018-09-22T10:24:17.535Z
|
20
docker-examples/v6/https-portal-example/docker-compose.yml
Normal file
20
docker-examples/v6/https-portal-example/docker-compose.yml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
services:
|
||||||
|
verdaccio:
|
||||||
|
image: verdaccio/verdaccio:nightly-master
|
||||||
|
container_name: verdaccio-https
|
||||||
|
ports:
|
||||||
|
- '4873:4873'
|
||||||
|
volumes:
|
||||||
|
- './storage:/verdaccio/storage'
|
||||||
|
- './conf:/verdaccio/conf'
|
||||||
|
https-portal:
|
||||||
|
image: steveltn/https-portal:1
|
||||||
|
ports:
|
||||||
|
- '80:80'
|
||||||
|
- '443:443'
|
||||||
|
links:
|
||||||
|
- verdaccio:verdaccio
|
||||||
|
environment:
|
||||||
|
DOMAINS: 'example.com -> http://verdaccio:4873'
|
||||||
|
STAGE: local
|
||||||
|
FORCE_RENEW: 'true'
|
Binary file not shown.
|
@ -0,0 +1,51 @@
|
||||||
|
{
|
||||||
|
"name": "@scope/example",
|
||||||
|
"versions": {
|
||||||
|
"1.0.0": {
|
||||||
|
"name": "@scope/example",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "exampled scoped module",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"example"
|
||||||
|
],
|
||||||
|
"author": {
|
||||||
|
"name": "Juan Picado"
|
||||||
|
},
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"jquery": "^3.3.1"
|
||||||
|
},
|
||||||
|
"_id": "@scope/example@1.0.0",
|
||||||
|
"_npmVersion": "6.3.0",
|
||||||
|
"_nodeVersion": "10.1.0",
|
||||||
|
"_npmUser": {},
|
||||||
|
"dist": {
|
||||||
|
"integrity": "sha512-UrpRhmCAwyGF2pWWd+fGDN8tFsVcCoLmK/qHaVAamphR+E4ZUjGf6N5GGgneFwbSeZ0FQrDYtUTPKrysxGIihQ==",
|
||||||
|
"shasum": "4c36e40e65049b32cd49599f65cb50b81b9d8810",
|
||||||
|
"tarball": "http://example.com/@scope/example/-/@scope/example-1.0.0.tgz"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"time": {
|
||||||
|
"modified": "2018-09-22T10:27:32.723Z",
|
||||||
|
"created": "2018-09-22T10:27:32.723Z",
|
||||||
|
"1.0.0": "2018-09-22T10:27:32.723Z"
|
||||||
|
},
|
||||||
|
"dist-tags": {
|
||||||
|
"latest": "1.0.0"
|
||||||
|
},
|
||||||
|
"_uplinks": {},
|
||||||
|
"_distfiles": {},
|
||||||
|
"_attachments": {
|
||||||
|
"example-1.0.0.tgz": {
|
||||||
|
"shasum": "4c36e40e65049b32cd49599f65cb50b81b9d8810",
|
||||||
|
"version": "1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"_rev": "7-24f17006c03f69b9",
|
||||||
|
"readme": "ERROR: No README data found!"
|
||||||
|
}
|
4914
docker-examples/v6/https-portal-example/storage/jquery/package.json
Normal file
4914
docker-examples/v6/https-portal-example/storage/jquery/package.json
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue