This package contains all the resources need to install Wellms Headless LMS from docker-images
Run npx --package=@escolalms/cla lms
Below are instruction on how to install Wellms on MacOs or Linux. Windows with WSL should work fine, yet there might be some issues
- please do share them with us.
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
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
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
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}"
Required dependencies:
docker
k8s
minikube
k9s
or whatever to view your kubernetes resources (e.g.Lens
)
Run makefile commands:
make minikube-init
make k8s-init
make minikube-tunnel
- wait a minute and enjoy the Wellms :)
make minikube-force-delete
make k8s-rebuild
make minikube-tunnel
TODO
WIP
- API
api.wellms.localhost
- Front app
app.wellms.localhost
- Admin panel
admin.wellms.localhost
- Mailhog
mailhog.wellms.localhost
Below are instructions how to install Wellms from [https://hub.docker.com/search?q=escolalms](docker images) in various ways.
- you have
docker
installed - port 80 is free
Run npx --package=@escolalms/cla lms
Clone this repository then,
in order to launch LMS
run make init
shell script
WSL
installed (https://docs.microsoft.com/en-us/windows/wsl/install)Docker
installed (https://docs.docker.com/desktop/windows/install/) and configured to use WSLmake
available in PowerShell (for example, you can installChocolatey
https://chocolatey.org/install and then installmake
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)
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)
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
- please create issue in this repository
- Windows users - this package is not tested on your system.
- Amends Caddyfile referring to the official documentation
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
By default all 3 threads phpfpm, Laravels Horizon and Scheduler are severed by one image container
php-fpm
serve main Laravel REST API (with nginx and caddy)horizon
is responsible for all queue servicesTask Scheduling
is responsible for all cron jobs
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:
- DISABLE_PHP_FPM=false
- DISABLE_NGINX=false
- DISABLE_HORIZON=true
- DISABLE_SCHEDULER=true
horizon:
image: escolalms/api:latest
networks:
- escola_lms
volumes:
- ./storage:/var/www/html/storage
- ./.env:/var/www/html/.env
environment:
- DISABLE_PHP_FPM=true
- DISABLE_NGINX=true
- DISABLE_HORIZON=false
- DISABLE_SCHEDULER=true
scheduler:
image: escolalms/api:latest
networks:
- escola_lms
volumes:
- ./storage:/var/www/html/storage
- ./.env:/var/www/html/.env
environment:
- DISABLE_PHP_FPM=true
- DISABLE_NGINX=true
- DISABLE_HORIZON=true
- DISABLE_SCHEDULER=false