An ansible playbook to build sinopia server
Important: This script will update your nodejs to a stable version
Install ansible in your machine and clone this repository. Edit the inventory file with the host's ips you want to run sinopia on Run:
ansible-playbook -i inventory playbook.yml -u <machine-user> -kK
vagrant up
Run this in your machine:
$npm set registry http://localhost:4873
Create a user (in this case any user is allowed):
$npm adduser --registry http://localhost:4873
This settings will be saved in your ~/.npmrc now it's only a matter to run:
$npm publish
- Nodejs (latest stable)
- Npm
- Wget
- zip
- vim
- Instalation directory: /var/www/sinopia
- URL: http://localhost:4873/
- Create user called sinopia in the server
- Install sinopia with a non-restriction config file which means that everyone will be able to pubilsh and read packages
- Creates a sinopia.sh script to start and stop the server
- Add sinopia.sh to cron so it can start sinopia on every reboot
Start
$cd /var/www/sinopia
$sudo ./sinopia.sh start
Stop
$cd /var/www/sinopia
$sudo ./sinopia.sh stop
- Change config file
- Go to the server and run $npm login or $npm adduser. It will create a user and sinopia will use it
- After that don't forget to ask you team to run: $npm adduser --registry http://localhost:4873