Skip to content

Instantly share code, notes, and snippets.

@lddsb
Last active March 2, 2019 02:04
Show Gist options
  • Select an option

  • Save lddsb/941a66d06267190e0b1b3b18c6117dad to your computer and use it in GitHub Desktop.

Select an option

Save lddsb/941a66d06267190e0b1b3b18c6117dad to your computer and use it in GitHub Desktop.
easy to using verdaccio
version: '3.7'
services:
verdaccio:
image: verdaccio/verdaccio
restart: always
container_name: verdaccio
networks:
- webnet
volumes:
- verdaccio:/verdaccio
nginx:
image: nginx:alpine
restart: always
container_name: verdaccio
networks:
- webnet
volumes:
- ./nginx/sites:/etc/nginx/conf.d
- ./nginx/logs:/var/log/nginx
- wwwroot:/var/www/html
ports:
- "80:80"
- "443:443"
networks:
webnet:
volumes:
verdaccio:
driver: local
wwwroot:
driver: local
server {
listen 80;
server_name your-verdaccio-domain.com;
location / {
proxy_pass http://verdaccio:4873/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_ssl_session_reuse off;
proxy_set_header Host $http_host;
proxy_redirect off;
}
access_log /var/log/nginx/verdaccio_access.log;
error_log /var/log/nginx/verdaccio_error.log;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment