Skip to content

Commit

Permalink
Merge pull request #83 from joglomedia/3.x.x
Browse files Browse the repository at this point in the history
3.0.0 New-Spirit

Initial LEMPer v3.0 development cycle
  • Loading branch information
joglomedia authored Jul 12, 2021
2 parents ef7f185 + a0a9f46 commit a6daa31
Show file tree
Hide file tree
Showing 16 changed files with 693 additions and 315 deletions.
2 changes: 1 addition & 1 deletion .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ NGX_HTTP_LUA=false
NGX_HTTP_MEMCACHED=false
NGX_HTTP_NAXSI=false
NGX_HTTP_NDK=false
NGX_HTTP_NJS=false
NGX_HTTP_JS=false
NGX_HTTP_PASSENGER=false
NGX_HTTP_REDIS2=false
NGX_HTTP_SUBS_FILTER=true
Expand Down
Binary file added .github/assets/favicon.ico
Binary file not shown.
241 changes: 241 additions & 0 deletions .github/assets/lemper-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
82 changes: 82 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# This is a basic workflow to help you get started with Actions

name: lemper-stack

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch
# - '!master' # excludes master
pull_request:
branches:
- master

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-20.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Prepare your
- name: Prepare testing env variables
run: |
cp .env.dist .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_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/ADMIN_EMAIL=\"[email protected]\"/ADMIN_EMAIL=\"[email protected]\"/g" .env
sed -i "s/PHP_VERSION=\"7.4\"/PHP_VERSION=\"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/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/INSTALL_FAIL2BAN=false/INSTALL_FAIL2BAN=true/g" .env
# Install LEMPer dependencies
- name: Run install testing dependencies
run: |
sudo apt-get update -qq -y
sudo apt-get install -qq -y bash curl shellcheck
sudo curl -s -o /usr/local/bin/shunit2 https://raw.githubusercontent.com/kward/shunit2/master/shunit2
sudo chmod a+x /usr/local/bin/shunit2
# Shellcheck
- name: Run shellcheck testing
env:
TERM: xterm-256color
run: |
shellcheck -s bash -x install.sh
shellcheck -s bash -x remove.sh
shellcheck -s bash -x lib/lemper-*.sh
shellcheck -s bash -x scripts/cleanup_server.sh
shellcheck -s bash -x scripts/helper.sh
shellcheck -s bash -x scripts/install_*.sh
shellcheck -s bash -x scripts/remove_*.sh
shellcheck -s bash -x scripts/secure_server.sh
# Simple unit testing
- name: Run unit testing
env:
TERM: xterm-256color
run: |
sudo bash scripts/cleanup_server.sh
sudo bash scripts/install_dependencies.sh
sudo bash shunit2/run_test.sh
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.env
.env.save
.travis.yml
lemper.log
lemper.sh
scripts/install_ffmpeg.sh
Expand Down
83 changes: 65 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
# [L]inux [E]ngine-X [M]ariaDB [P]HP Install[ER]

LEMPer stands for Linux, Engine-X (Nginx), MariaDB and PHP installer written in Bash script. This is just a small tool set (a bunch collection of scripts) that usually I use to deploy and manage LEMP stack on Debian/Ubuntu. LEMPer is _CloudWays_, _Ploi_, _RunCloud_, and _ServerPilot_ free alternative crafted to support wide-range PHP framework (not only WordPress).

[![Build Status](https://api.travis-ci.com/joglomedia/LEMPer.svg?branch=2.0.x)](https://travis-ci.com/github/joglomedia/LEMPer)
<p align="center">
<img src="/.github/assets/lemper-logo.svg?raw=true" alt="Serverd by LEMPer Stack © @joglomedia"/>
</p>

<p align="center">
<a href="https://github.com/joglomedia/LEMPer/releases"><img src="https://img.shields.io/github/v/tag/joglomedia/LEMPer?label=version" alt="LEMPer version"></a>
<a href="https://github.com/joglomedia/LEMPer/stargazers"><img src="https://img.shields.io/github/stars/joglomedia/LEMPer.svg" alt="GitHub stars"></a>
<a href="https://github.com/joglomedia/LEMPer/network"><img src="https://img.shields.io/github/forks/joglomedia/LEMPer.svg" alt="GitHub forks"></a>
<a href="https://github.com/joglomedia/LEMPer/issues"><img src="https://img.shields.io/github/issues/joglomedia/LEMPer.svg" alt="GitHub issues"></a>
<a href="https://github.com/joglomedia/LEMPer/actions/workflows/main.yml"><img src="https://github.com/joglomedia/LEMPer/actions/workflows/main.yml/badge.svg" alt="GitHub CI"></a>
<a href="https://raw.githubusercontent.com/joglomedia/LEMPer/master/LICENSE.md"><img src="https://img.shields.io/badge/license-GPLv3-blue.svg" alt="GitHub license"></a>
</p>

<p align="center">
LEMPer stands for Linux, Engine-X (Nginx), MariaDB and PHP installer written in Bash script. This is just a small toolset (a bunch collection of scripts) that usually I use to deploy and manage LEMP stack on Debian/Ubuntu server. LEMPer is crafted to support wide-range PHP framework & CMS. It is available as <em>Free Alternative</em> to control panel such as cPanel, Plesk, CloudWays, Ploi, RunCloud, ServerPilot, etc.
</p>

## Features

Expand Down Expand Up @@ -40,33 +53,33 @@ LEMPer stands for Linux, Engine-X (Nginx), MariaDB and PHP installer written in
* Make a copy of .env.dist to .env ```cp .env.dist .env``` and replace the values.
* Execute install.sh file, ```sudo ./install.sh```.

### Install LEMPer stack
### Install LEMPer Stack

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

### Remove LEMPer stack
### Remove LEMPer Stack

```bash
sudo ./remove.sh
```

## LEMPer Command Line Administration Tool
### LEMPer Command Line Administration Tool

LEMPer comes with friendly command line tool which will make your LEMP stack administration much easier. These command line tool called Lemper CLI (lemper-cli) for creating new virtual host and managing existing LEMP stack.

### LEMPer CLI Usage
#### LEMPer CLI Usage

Here are some examples of using LEMPer CLI.

#### LEMPer CLI add new vhost / website
##### LEMPer CLI add new vhost / website

```bash
sudo lemper-cli create -u username -d example.app -f default -w /home/username/Webs/example.app
```

#### LEMPer CLI manage vhost / website
##### LEMPer CLI manage vhost / website

Example, enable SSL

Expand All @@ -80,15 +93,15 @@ Example, enable FastCGI cache
sudo lemper-cli manage --enable-fastcgi-cache example.app
```

#### for more help
##### for more help

```bash
sudo lemper-cli --help
```

Note: Lemper CLI will automagically add a new PHP-FPM user's pool configuration if it doesn't exists. You must add the user account first.

## Web-based Administration
### Web-based Administration

You can access pre-installed web-based administration tools here

Expand All @@ -108,7 +121,7 @@ TinyFilemanage (Web-based file managemer)
http://YOUR_DOMAIN_NAME:8082/lcp/filemanager
```

## TODO
## TODOs

* ~~Custom build latest [Nginx](https://nginx.org/en/) from source~~
* ~~Add [Let's Encrypt SSL](https://letsencrypt.org/)~~
Expand All @@ -120,27 +133,61 @@ http://YOUR_DOMAIN_NAME:8082/lcp/filemanager
* Add user account & hosting package management.
* Add your feature [request here](https://github.com/joglomedia/LEMPer/issues/new).

## Security Vulnerabilities and Bugs

If you discover any security vulnerability or any bug within _LEMPer Stack_, please open an issue.

## Contributing

* Fork it ([https://github.com/joglomedia/LEMPer/fork](https://github.com/joglomedia/LEMPer/fork))
* Create your feature branch (git checkout -b my-new-feature) or fix issue (git checkout -b fix-some-issue)
* Commit your changes (git commit -am 'Add some feature') or (git commit -am 'Fix some issue')
* Push to the branch (git push origin my-new-feature) or (git push origin fix-some-issue)
* Create a new Pull Request
* Travis unit tests will be run to make sure that your changes does not have errors or warning
* GitHub Workflows will be run to make sure that your changes does not have errors or warning

## Awesome People

**LEMPer Stack** is an open-source project licensed under the GNU GPLv3 license with its ongoing development made possible entirely by the support of all these smart and generous people, from code contributors to financial contributors. :purple_heart:

Thank you for considering contributing to this project!

## TL;DR
### Project Maintainers

If you're looking for mature, feature rich, advanced services with 24/7 premium support, please don't use this script.
<table>
<tbody>
<tr>
<td align="center" valign="top">
<img width="125" height="125" src="https://github.com/joglomedia.png?s=150">
<br>
<strong>Edi Septriyanto</strong>
<br>
<a href="https://github.com/joglomedia">@joglomedia</a>
</td>
</tr>
</tbody>
</table>

## DONATION
### Code Contributors

<a href="https://github.com/joglomedia/LEMPer/graphs/contributors">
<img src="https://contrib.rocks/image?repo=joglomedia/LEMPer" />
</a>

Made with [contributors-img](https://contrib.rocks).

### Financial Contributors

You can support us using any of the methods below:

**[Buy Me a Bottle of Milk or a Cup of Coffee](https://paypal.me/masedi) !!**

## SPONSORSHIP
## Licence

Be the first one!
LEMPer stack is open-source project licensed under the GNU GPLv3 license.

## Copyright

(c) 2014-2021 | [MasEDI.Net](https://masedi.net/)

### Enjoy LEMPer Stack ;)
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ http {

# Enable Compression.
# gzip (default) or brotli (requires Nginx installed with brotli module).
include /etc/nginx/comp_gzip;
#include /etc/nginx/comp_gzip;

# Uncomment to enable FastCGI cache. If disabled, do not use the cached vhost setting.
include /etc/nginx/fastcgi_cache;
Expand Down
2 changes: 1 addition & 1 deletion etc/nginx/vhost/site_codeigniter.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Designed to be included in any server {} block.

location / {
try_files $uri $uri/ /index.php?$args;
try_files $uri $uri/ /index.php?$is_args$args;

# Uncomment to enable naxsi on this location
#include /etc/nginx/naxsi.rules
Expand Down
Loading

0 comments on commit a6daa31

Please sign in to comment.