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

@escolalms/cla

v1.4.6

Published

Create LMS APP. Escola LMS. Wellms.

Downloads

56

Readme

Create LMS APP

This package contains all the resources need to install Wellms Headless LMS from docker-images

TL;DR

Run npx --package=@escolalms/cla lms

Installation on MacOs or Linux

Below are instruction on how to install Wellms on MacOs or Linux. Windows with WSL should work fine, yet there might be some issues

Environmental variables

Laravel specific. LARAVEL_PREFIX

After container is initialized, it looks for variables with this prefix then replace current ones in .env file

Example

LARAVEL_APP_ENV: "production"
LARAVEL_APP_KEY: "base64:vw6G2uP8LV22haEERtzr5yDCBraLrMwbxlbSJDA97uk="
LARAVEL_APP_DEBUG: "false"
LARAVEL_APP_LOG: "errorlog"

will result in

Replacing .env file APP_ENV from local to production
Replacing .env file APP_KEY from base64:pveos6JL8iCwO3MbzoyQpNx6TETMYuUpfZ18CDKl6Cw= to base64:vw6G2uP8LV22haEERtzr5yDCBraLrMwbxlbSJDA97uk=
Replacing .env file APP_DEBUG from true to false
Replacing .env file APP_LOG_LEVEL from debug to debug

URLs

You can use this following variables when calling bash or makefile task

APP_URL="${APP_URL:-http://api.wellms.localhost}"
ADMIN_URL="${ADMIN_URL:-http://admin.wellms.localhost}"
FRONT_URL="${FRONT_URL:-http://app.wellms.localhost}"
MAILHOG_URL="${MAILHOG_URL:-http://mailhog.wellms.localhost}"

Example

APP_URL=http://my-super-api.localhost make init

or

APP_URL=http://my-super-api.localhost make k8s-rebuild

Kubernetes

Without helm

All yaml file templates are inside k8s/tpls folder

You can either generate yaml by calling bash script cd k8s && bash generate.sh or by calling makefile job `make or but setting all config manually

Once yaml files are in k8s folder run kubectl apply -f k8s

Custom domain

Those are env variables you can set while running generate

APP_URL="${APP_URL:-http://api.wellms.localhost}"
ADMIN_URL="${ADMIN_URL:-http://admin.wellms.localhost}"
FRONT_URL="${FRONT_URL:-http://app.wellms.localhost}"
MAILHOG_URL="${MAILHOG_URL:-http://mailhog.wellms.localhost}"

First run

Required dependencies:

  • docker
  • k8s
  • minikube
  • k9s or whatever to view your kubernetes resources (e.g. Lens)

Mac OS

Run makefile commands:

  • make minikube-init
  • make k8s-init
  • make minikube-tunnel
  • wait a minute and enjoy the Wellms :)

Rebuild existing instance

  • make minikube-force-delete
  • make k8s-rebuild
  • make minikube-tunnel

Windows

TODO

With helm

WIP

Available Wellms resources:

  • API api.wellms.localhost
  • Front app app.wellms.localhost
  • Admin panel admin.wellms.localhost
  • Mailhog mailhog.wellms.localhost

From docker container images

Below are instructions how to install Wellms from [https://hub.docker.com/search?q=escolalms](docker images) in various ways.

Requirements

  • you have docker installed
  • port 80 is free

Installation from script

Run npx --package=@escolalms/cla lms

Installation from source

Clone this repository then,

in order to launch LMS

run make init shell script

Instalation on Windows

Requirements

  • WSL installed (https://docs.microsoft.com/en-us/windows/wsl/install)
  • Docker installed (https://docs.docker.com/desktop/windows/install/) and configured to use WSL
  • make available in PowerShell (for example, you can install Chocolatey https://chocolatey.org/install and then install make using it)

Recommended: use Windows Terminal (https://apps.microsoft.com/store/detail/windows-terminal/) and latest PowerShell (https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.2)

Installation from source

The source means source code of this repository, not the actual Wellms components. Tasks describes below will install docker containers.

  • Clone this repository
  • Run make init in PowerShell (and not in WSL shell, because it will lead to problems with binding Postgres data volume for persistence)

First steps

Once everything is installed (takes a while)

  • http://api.wellms.localhost/api/documentation API Swagger documentation
  • http://admin.wellms.localhost admin panel credentials username: [email protected] password: secret
  • http://app.wellms.localhost demo panel credentials username: [email protected] password: secret
  • http://mailhog.wellms.localhost demo panel credentials username: [email protected] password: secret

Troubleshooting

  • please create issue in this repository
  • Windows users - this package is not tested on your system.

Custom domains

there is a credentials.sh script to generate config files, example

APP_URL=https://api.escolalms.com ADMIN_URL=https://admin.escolalms.com FRONT_URL=https://demo.escolalms.com ./credentials.sh MAILHOG_URL=https://mailhog.escolalms.com REPORTBRO_URL=https://reportbro.escolalms.com ./credentials.sh

Scaling php-fpm, Horizon & Scheduler.

By default all 3 threads phpfpm, Laravels Horizon and Scheduler are severed by one image container

All of above including nginx are served by supervisor, definition files are listed here

You can scale this by setting each process into separate image container, just by amending docker-compose.yml in the following way

api:
  image: escolalms/api:latest
  networks:
    - escola_lms
  volumes:
    - ./storage:/var/www/html/storage
    - ./.env:/var/www/html/.env
  environment:
    - DISBALE_PHP_FPM=false
    - DISBALE_NGINX=false
    - DISBALE_HORIZON=true
    - DISBALE_SCHEDULER=true

horizon:
  image: escolalms/api:latest
  networks:
    - escola_lms
  volumes:
    - ./storage:/var/www/html/storage
    - ./.env:/var/www/html/.env
  environment:
    - DISBALE_PHP_FPM=true
    - DISBALE_NGINX=true
    - DISBALE_HORIZON=false
    - DISBALE_SCHEDULER=true

scheduler:
  image: escolalms/api:latest
  networks:
    - escola_lms
  volumes:
    - ./storage:/var/www/html/storage
    - ./.env:/var/www/html/.env
  environment:
    - DISBALE_PHP_FPM=true
    - DISBALE_NGINX=true
    - DISBALE_HORIZON=true
    - DISBALE_SCHEDULER=false