npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@lilaquadrat/hosting

v2.3.0

Published

Package for handline nginx and docker for STUDIO

Downloads

6

Readme

STUDIO-HOSTING

handles external commands for nginx and docker

HOW

checks every INTERVAL seconds the connected database for new commands

REQUIREMENTS

  • nodejs >= 12
  • git
  • nginx
  • docker
  • docker-compose

SETUP

MOUNT FILE SHARE

  • vim /etc/fstab
  • add the following code and replace YOURSHARE, YOURUSERNAME and YOURPASSWORD

//liveeditor.file.core.windows.net/YOURSHARE /mnt/storage cifs nofail,vers=3.0,username=YOURUSERNAME,password=YOURPASSWORD,dir_mode=0777,file_mode=0777

SERVICES

command service

To create all needed systemd service files, start the main.js with argument createServices. The newly generated files will be in the new folder services

/base/studio-hosting/node_modules/@lilaquadrat/hosting/lib/main.js --createServices
  • systemctl enable studio-hosting.service for enabling autostart

  • systemctl start studio-hosting.service

  • systemctl stop studio-hosting.service

  • journalctl -e -u studio-hosting.service to show the logs

ENV FILE

the linked .env file needs the following variables

| variablename | example value | description | | -----------: | :--------------------------------------------------------------------: | :----------------------------------------------------------- | | VAULT | https://YOUR_VAULT.vault.azure.net/ | url of the vault with the secret | | API_ENDPOINT | http://localhost:9090 | endpoint from which the commands are provided | | APPINSIGHTS_NAME | hostingServer | for filtering in applicationinsights | | APPINSIGHTS_KEY | XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX | for authentication with applicationinsights | | INTERVAL | 60000 | interval for fetching new commands from the api | | DOCKERFILE | /base/data/docker-compose.json | dockerfile that will be used for all docker-compose commands |

docker-compose service

  • vim /etc/systemd/system/docker-compose.service
    • copy the content of systemd/docker-compose.service in this repo in the new created file.
    • LINE #10 / #11 needs to be changed to your docker-compose.json
  • systemctl enable docker-compose

nginx service

  • systemctl enable nginx
  • vim /etc/systemd/system/multi-user.target.wants/nginx.service
    • add "mnt-storage.mount" to LINE #3

the stream and proxy conf have to be added to the main nginx.conf.

  • vim /etc/nginx/nginx.conf

see the nginx.conf in this repository