Coder Social home page Coder Social logo

dockerfiles's Introduction

EasyEngine Logo

EasyEngine v4

Build πŸ”¨ + Test πŸ‘¨β€πŸ”§ Latest Stable Version License

EasyEngine makes it greatly easy to manage nginx, a fast web-server software that consumes little memory when handling increasing volumes of concurrent users.

Requirements

  • Docker
  • Docker-Compose
  • PHP CLI (>=7.1)
  • PHP Modules - curl, sqlite3, pcntl

Installing

Linux

For Linux, we have created an installer script that will install all the dependencies for you. We have tested this on Ubuntu 14.04, 16.04, 18.04, 20.04, 22.04 and Debian 8, Debian 10.

wget -qO ee https://rt.cx/ee4 && sudo bash ee

Even if the script doesn't work for your distribution, you can manually install the dependencies and then run the following commands to install EasyEngine

wget -O /usr/local/bin/ee https://raw.githubusercontent.com/EasyEngine/easyengine-builds/master/phar/easyengine.phar
chmod +x /usr/local/bin/ee

Tab completions

EasyEngine also comes with a tab completion script for Bash and ZSH. Just download ee-completion.bash and source it from ~/.bash_profile:

source /FULL/PATH/TO/ee-completion.bash

Don't forget to run source ~/.bash_profile afterwards.

If using zsh for your shell, you may need to load and start bashcompinit before sourcing. Put the following in your .zshrc:

autoload bashcompinit
bashcompinit
source /FULL/PATH/TO/ee-completion.bash

Usage

To get started with EasyEngine and create a wordpress site, run

ee site create example.com --type=wp

Need a wordpress site with caching? Try

ee site create example.com --type=wp --cache

Need a wordpress multi-site with page cache?

ee site create example.com --type=wp --mu=subdir --cache

Need a plain and simple html site?

ee site create example.com

Want to play around with your new site?

ee shell example.com

Want to know more? Checkout readme of these commands -

Note: ⚠️ EasyEngine will currently only run with root privileges. You can run ee help, ee help site and ee help site create --type=wp to get all the details about the various commands and subcommands that you can run.

Development

Development of easyengine is done entirely on GitHub.

We've used wp-cli framework as a base and built EasyEngine on top of it.

This repo contains the main core of easyengine (the framework). All top level commands(except ee cli) i.e. ee site, ee shell have their own repos.

Currently, we have the following commands which are bundled by default in EasyEngine:

In future, the community will be able to make their own packages and commands!

Contributing

We warmheartedly welcome all contributions however and in whatever capacity you can either through Pull Requests or by reporting Issues. You can contribute here or in any of the above mentioned commands repo.

Donations

PayPal-Donate

Does this interest you?

Handcrafted Enterprise WordPress Solutions by rtCamp

dockerfiles's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dockerfiles's Issues

Use ZSH as default shell for PHP

Currently, we have bash as the default shell, it will be nice to have ZSH as the default shell as it has better features and aesthetics.

Forward real IP to site

nginx-proxy was not properly forwarding real IP of the visitor to the site's nginx. This could cause issues wherever the visitor's true IP is required.

Add SUHOSIN extension to PHP

It is there in multiple plugins.

Planning to add it, but keep it disabled by default so that it does not hamper anything. Whoever wants it can enable this extension.

Fix upstream sent too big header

Following need to be increased to allow long url requests to be handled:

On site nginx configuration:

fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;

On proxy nginx configuration:

proxy_buffers 16 16k;
proxy_buffer_size 32k;

Install VIP extensions in EE

Following are PHP extensions persent in VIP image, but not in EE:

a8c
apcu
calendar
cgi-fcgi
gmagick
gmp
mcrypt
pcntl
shmop
sockets
sysvsem
sysvshm
timezonedb

PHP 7.4 need - Please allow us to upgrade to newer php versions on EasyEngine v4

Why Easyengine v4 is not yet allowing easy methods for upgrading php version on php/wp websites? I'm looking for a solution all over the web and that seems there's no way to update a site to a newer php version once it is created.

Perhaps EE v4 could maintain an alternate php docker image with the most up to date php version, and then allow EE users to override it by command line.

Version updates

  • Nginx
  • PHP-FPM
  • Mariadb
  • Redis
  • Nginx-Proxy
  • MailHog
  • PostFix
  • NewRelic

Have to check which versions we are on and if updates are available.

Add labelschema labels to postfix image

We need to add following tags to postfix image:

LABEL org.label-schema.schema-version="1.0.0-rc1"
LABEL org.label-schema.vendor="EasyEngine"
LABEL org.label-schema.name="postfix

Due to this Postfix containers are not getting removed while running ee cli self-uninstall

fix newrelic.ini permission

Issue:
In the case of docker rm and start it is not able to sed in the newrelic.ini file.

Solution:

add in PHP dockerfile/entry-point at a later stage after sed

su www-data

Pin base image with SHA hash

We need to pin the docker images to a specific hash to avoid any unnecessary surprises.

Something like

FROM debian@sha256:de3eac83cd481c04c5d6c7344cd7327625a1d8b2540e82a8231b5675cef0ae5f

Here is a link to an Example Dockerfile

MySQL binlog enabling:

Make defaults

log_bin                 = /var/log/mysql/mariadb-bin
log_bin_index           = /var/log/mysql/mariadb-bin.index
binlog_format           = statement
# not fab for performance, but safer
#sync_binlog            = 1
expire_logs_days        = 10
max_binlog_size         = 100M

Fix EasyEngine configuration changes

  • X-Powered-By: EasyEngine header is static and does not contain the actual version of EasyEngine that has created a particular site.

  • X-Powered-By: PHP/<version-number> needs to be removed, so as to not reveal the version of PHP being used by the site.

  • Need to move inclusion of custom conf files into site template ngix conf.

  • Skip /etc/hosts entry for ssl site and remove aliasing in nginx network in this case.

  • Bring all nginx and php configurations in common parent directory.

nginx image cannot be used standalone

Seems we made it php dependent.

2018/06/02 12:50:56 [emerg] 1#1: host not found in upstream "php" in /usr/local/openresty/nginx/conf/common/php.conf:10
nginx: [emerg] host not found in upstream "php" in /usr/local/openresty/nginx/conf/common/php.conf:10

Cleaning up nginx conf

folder - nginx/conf
we need to clean it up keeping v4 structure in mind.

  • cleanup global nginx.conf at nginx/conf/ nginx.confin the repo. /usr/local/openresty/nginx/conf/nginx.conf inside container
  • nginx.conf will include site specific config from /var/www/conf/nginx/site.conf. EEv4 will create/generate this file.

Users can create additional conf files in /var/www/conf/nginx/custom/ with .conf extension. Something like /var/www/conf/nginx/custom/redirects.conf.

https://blog.martinfjordvald.com/2013/04/nginx-config-history-fastcgi_params-versus-fastcgi-conf/

woff2 and extra mime types support

I think rather than copy-pasting mime.types, we can include another type {} block in our nginx.conf with additional types

types{
    application/font-woff2           woff2;
}

Consolidate configurations

  • Consolidate and update php configuration
  • Consolidate and update nginx configuration
  • Add postfix volume mounting

Add "libsasl2-modules" in Postfix

Aug 27 07:12:19 ip-10-1-2-123 example.com/smtp[76]: A4997FB6AA: to=<[email protected]>, relay=smtp.example.com[IP]:PORT, delay=6, delays=0.01/0.03/6/0, dsn=4.7.0, status=deferred (SASL authentication failed; cannot authenticate to server smtp.example.com[IP]: no mechanism available)   

fix:

apt-get install libsasl2-modules

Docker Version Management - latest versus specific version

A large number of the dockerfile containers use the :latest parameter to pull the most recent version of the software.

This recently caused problems with the nginx-proxy version 0.6.0. See: https://community.easyengine.io/t/site-down-after-updating-to-v4-0-12/12610/17

There should be a config file available to specifically define the version the dockerfile uses. This would allow a user the ability to downgrade from the latest due to known issues.

For example, the config file could look like:

cron:latest
mailhog:v1.0.0
mariadb:10.2
nginx-proxy:latest
nginx:stretch

The other options are to place the dockerfiles on the server and build the dockers from on server dockerfiles.

Fix srcache fetch status in logs

Replace: upstream_cache_status with srcache_fetch_status

    log_format rt_cache '$remote_addr $upstream_response_time $srcache_fetch_status [$time_local] '
    '$http_host "$request" $status $body_bytes_sent '
    '"$http_referer" "$http_user_agent"'
    ' $request_time' ;

Check upstream_response_time as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.