Skip to content

Commit

Permalink
Merge pull request #121 from joglomedia/2.x.x
Browse files Browse the repository at this point in the history
2.4.4 proposed
  • Loading branch information
joglomedia authored Dec 23, 2021
2 parents adb993e + ff2ae02 commit d942507
Show file tree
Hide file tree
Showing 54 changed files with 3,631 additions and 3,033 deletions.
51 changes: 32 additions & 19 deletions .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Auto install, true for auto installation,
# false for manual or guided installation.
AUTO_INSTALL=true
FORCE_INSTALL=true

# Cleanup existing LEMP / LAMP stack installation.
AUTO_REMOVE=true
Expand All @@ -16,7 +17,7 @@ FORCE_REMOVE=true
DRYRUN=false

# Attempt to fix broken packages.
FIX_BROKEN=false
FIX_BROKEN_INSTALL=false

# Allocate swap space that will be used for swap.
ENABLE_SWAP=true
Expand All @@ -25,10 +26,10 @@ ENABLE_SWAP=true
LOGGING=true

# Path to the install log file.
LOG_FILE="./install.log"
LOG_FILE="./lemper_install.log"

# LEMPer build directorty, will be removed after installation.
BUILD_DIR="/usr/local/src/lemper"
BUILD_DIR="/tmp/lemper"

[lemper]
# LEMP stack environment.
Expand Down Expand Up @@ -140,6 +141,10 @@ NGX_PAGESPEED=true
NGX_RTMP=false
NGX_STREAM=true

# Rate limit module.
NGINX_RATE_LIMITING=false
NGINX_RATE_LIMIT_REQUESTS=100

[php]
INSTALL_PHP=true

Expand All @@ -149,7 +154,8 @@ PHP_VERSIONS="7.4 8.0"

# Additional PHP modules (extensions) to install.
# Installing multiple extension is supported, separate version by space.
PHP_EXTENSIONS=""
# Type only the extension name (without php*-).
PHP_EXTENSIONS="geoip gnupg imagick igbinary json mcrypt memcache memcached msgpack openswoole libsodium"

# DO NOT CHANGE
DEFAULT_PHP_VERSION="7.4"
Expand All @@ -159,20 +165,8 @@ DEFAULT_PHP_VERSION="7.4"
# to load protected and encoded files.
INSTALL_PHP_LOADER=false

# Available PHP loader: ioncube | sourceguardian
# leave it blank or "none" to skip PHP loader installation.
PHP_LOADER="none"

[php-imagemagick]
# ImageMagick is a free and open-source software suite for manipulating raster and vector image.
INSTALL_PHP_IMAGEMAGICK=true

# Available ImageMagick & PHP module installer: repo | source
# leave it blank or "none" to skip PHP ImageMagick installation.
PHP_IMAGEMAGICK_INSTALLER="repo"

# Available ImageMagick version: 6.9.10-62 | 7.1.0-0 | latest
PHP_IMAGEMAGICK_VERSION="7.1.0-0"
# Available PHP loader: ioncube | sourceguardian | all
PHP_LOADER="ioncube"

[php-phalcon]
# Phalcon is a PHP web framework based on the MVC pattern delivered as C-extension.
Expand All @@ -191,6 +185,16 @@ PHP_ZEPHIR_VERSION="0.12.19"
[php-composer]
INSTALL_PHP_COMPOSER=true

[imagemagick]
# ImageMagick is a free and open-source software suite for manipulating raster and vector image.
INSTALL_IMAGEMAGICK=true

# Available ImageMagick & PHP module installer: repo | source
IMAGEMAGICK_INSTALLER="repo"

# Available ImageMagick version: 6.9.10-62 | 7.1.0-8 | latest
IMAGEMAGICK_VERSION="7.1.0-8"

[mysql]
INSTALL_MYSQL=true
MYSQL_SERVER="mariadb"
Expand Down Expand Up @@ -241,13 +245,22 @@ INSTALL_REDIS=false
# Available installer: repo | source.
REDIS_INSTALLER="repo"

# Available Redis version: 6.2.5, or stable.
# Available Redis version: 6.2.5 or stable.
REDIS_VERSION="stable"

# Enable pass authentication.
REDIS_REQUIRE_PASSWORD=false
REDIS_PASSWORD=""

[vsftpd]
INSTALL_VSFTPD=true

# Available installer: repo | source.
VSFTPD_INSTALLER="source"

# Available version: 3.0.5 or latest.
VSFTPD_VERSION="3.0.5"

[dns]
# TODO: Install DNS server.

Expand Down
25 changes: 15 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,41 @@ name: lemper-stack
on:
push:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch
# - '!master' # excludes master
- '2.x.x'
- '3.x.x'
- 'master'
pull_request:
branches:
- master
- '2.x.x'
- '3.x.x'
- 'master'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
# Prepare testing environment
- name: Prepare testing environment
run: |
cp .env.dist .env
sed -i "s/FIX_BROKEN_INSTALL=false/FIX_BROKEN_INSTALL=true/g" .env
sed -i "s/ENVIRONMENT=\"production\"/ENVIRONMENT=\"development\"/g" .env
sed -i "s/SERVER_HOSTNAME=\"\"/SERVER_HOSTNAME=\"travis-ci.masedi.net\"/g" .env
sed -i "s/SERVER_HOSTNAME=\"\"/SERVER_HOSTNAME=\"gh-ci.lemper.cloud\"/g" .env
sed -i "s/SERVER_IP=\"\"/SERVER_IP=\"127.0.0.1\"/g" .env
sed -i "s/AUTO_INSTALL=false/AUTO_INSTALL=true/g" .env
sed -i "s/AUTO_REMOVE=false/AUTO_REMOVE=true/g" .env
sed -i "s/FORCE_REMOVE=false/FORCE_REMOVE=true/g" .env
sed -i "s/LEMPER_ADMIN_EMAIL=\"[email protected]\"/LEMPER_ADMIN_EMAIL=\"[email protected]\"/g" .env
sed -i "s/PHP_VERSIONS=\"7.4\"/PHP_VERSIONS=\"7.4\"/g" .env
sed -i "s/INSTALL_PHP_LOADER=false/INSTALL_PHP_LOADER=true/g" .env
sed -i "s/PHP_LOADER=\"none\"/PHP_LOADER=\"ioncube\"/g" .env
sed -i "s/PHP_IMAGEMAGICK_INSTALLER=\"repo\"/PHP_IMAGEMAGICK_INSTALLER=\"source\"/g" .env
sed -i "s/IMAGEMAGICK_INSTALLER=\"source\"/IMAGEMAGICK_INSTALLER=\"repo\"/g" .env
sed -i "s/INSTALL_MEMCACHED=false/INSTALL_MEMCACHED=true/g" .env
sed -i "s/INSTALL_MONGODB=false/INSTALL_MONGODB=true/g" .env
sed -i "s/INSTALL_REDIS=false/INSTALL_REDIS=true/g" .env
sed -i "s/INSTALL_MAILER=true/INSTALL_MAILER=false/g" .env
sed -i "s/INSTALL_SPFDKIM=true/INSTALL_SPFDKIM=false/g" .env
sed -i "s/SENDER_DOMAIN=\"example.com\"/SENDER_DOMAIN=\"localhost.localhost\"/g" .env
sed -i "s/SENDER_DOMAIN=\"example.com\"/SENDER_DOMAIN=\"lemper.test\"/g" .env
sed -i "s/INSTALL_FAIL2BAN=false/INSTALL_FAIL2BAN=true/g" .env
# Install Dependencies
- name: Install testing dependencies
Expand All @@ -54,6 +58,7 @@ jobs:
set -ex
shellcheck -s bash -x install.sh
shellcheck -s bash -x remove.sh
shellcheck -s bash -x bin/lemper-*.sh
shellcheck -s bash -x lib/lemper-*.sh
shellcheck -s bash -x scripts/cleanup_server.sh
shellcheck -s bash -x scripts/helper.sh
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ bin/lemper-cli-enc.sh
bin/lemper-cli-enc.sh.x.c
bin/lemperography.php
LEMPer.wiki
install.log
#lib/lemper-create.sh
#lib/lemper-manage.sh
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ LEMPer stands for Linux, Engine-X (Nginx), MariaDB and PHP installer written in
* [Adminer](https://www.adminer.org/) web-based SQL & MongoDB database manager (PhpMyAdmin replacement).
* [phpRedisAdmin](https://github.com/erikdubbelboer/phpRedisAdmin) web-based Redis database manager.
* [phpMemcachedAdmin](https://github.com/elijaa/phpmemcachedadmin) web-based Memcached manager.
* [TinyFileManager](https://github.com/prasathmani/tinyfilemanager) alternative web-based filemanager (Experimental).
* [TinyFileManager](https://github.com/joglomedia/tinyfilemanager) alternative web-based filemanager (Experimental).

## Setting Up

Expand All @@ -56,7 +56,11 @@ LEMPer stands for Linux, Engine-X (Nginx), MariaDB and PHP installer written in
### Install LEMPer Stack

```bash
sudo apt-get install git && git clone -q https://github.com/joglomedia/LEMPer.git && cd LEMPer && cp -f .env.dist .env && sudo ./install.sh
sudo apt-get install git && \
git clone -q https://github.com/joglomedia/LEMPer.git && \
cd LEMPer && \
cp -f .env.dist .env && \
sudo ./install.sh
```

### Remove LEMPer Stack
Expand All @@ -76,15 +80,16 @@ Here are some examples of using LEMPer CLI.
##### LEMPer CLI add new vhost / website

```bash
sudo lemper-cli create -u ${USER} -d example.test -f wordpress -w ${HOME}/webapps/example.test --install-app
sudo lemper-cli create -u ${USER} -d example.test -f wordpress -w ${HOME}/webapps/example.test --install-skeleton
```

:warning: For local/development environment, in order to make the test domain (e.g. example.test) working as expected, you need to do a small workaround by modifying the `/etc/hosts` file. By adding the local domain name to the hosts file and assign it with local/private IP address.

Since version 2.4.0 this workaround could be done via `lemper-cli` by passing `--ipv4` parameter and assign it with private IP address, as below:

```bash
sudo lemper-cli create -u ${USER} -d example.test -f wordpress -w ${HOME}/webapps/example.test --ipv4=127.0.10.1 --install-app
sudo lemper-cli create -u ${USER} -d example.test -f wordpress \
-w ${HOME}/webapps/example.test --ipv4=127.0.10.1 --install-skeleton
```

For more info
Expand Down
Loading

0 comments on commit d942507

Please sign in to comment.