Docker LEMP easy integration
Docker LEMP easy integration (with VScode Devcontainers Support)
Easydock comes with:
- PHP (PHP-FPM 5.6, 7.1, 7.2, 7.3, 7.4, 8.0 or 8.1)
- MySql (MySql 8)
- Composer 2
- vscode devcontainers mode support
- PHP Unit, CS Fix and PHP Stan tools (you can use them in pipelines too)
- Docker Desktop (https://www.docker.com/products/docker-desktop)
- Composer (https://getcomposer.org/download) (installation without composer - WIP...)
$ cd /path/to/your-php-application $ composer require andreapollastri/easydock $ sh ./vendor/andreapollastri/easydock/src/.easydock export
- After installation, if you need, add these vars to your
.envfile (default values are declared yet so you don't need to create an .env file if you don't need to customize follow variables):
# APPLICATION NAME (unique app-service-id) APP_SID=easydock # APPLICATION SOURCE PATH APP_PATH=./ # APP PORT APP_PORT=80 # PHP VERSION (available vers: 5.6, 7.1, 7.2, 7.3, 7.4, 8.0 or 8.1) PHP_V=8.1 # MYSQL DB NAME DB_NAME=dockerdb # MYSQL ROOTPASSWORD DB_PASS=secret # MYSQL DB PORT DB_PORT=3306 # REDIS PORT RDS_PORT=6379 # MAILHOG PORT MH_PORT=8025 # NODE VERSION NODE_V=16 # NGINX CONF ('public' or 'root' for backend apps, 'dist' or 'build' for fronend apps) NGINX_CONF=public
To use easydock in vscode devcontainer mode, build container via vscode
If you are not running Easydock into vscode devcontainer mode, use:
$ sh ed up
to start your istance
$ sh ed conn
to "SSH" into your Docker istance
$ sh ed down
to stop your istance
- Config your app DB connection (default)
user: root pass: secret db: dockerdb host: mysql ( or redis for Redis )
- Config your app SMTP conn (default - no user or pass are required)
host: mailhog port: 1025
Nginx by default config will expose your project
/publicfolder (NGINX_CONF=public, use it with Laravel, etc...)
(add NGINX_CONF=root into your .env file to make it work outside public path, use it with Wordpress, etc...
or NGINX_CONF=dist / NGINX_CONF=build to use it within single page application or similar frontend apps).
You can customize all "devops" configurations with ".easydock" files (restart containers after changes)
To discover all Easydock functions use:
$ sh ed help
If you discover any security vulnerability or any bug within easydock, please open an issue.
Thank you for considering contributing to this project!
Easydock is open-source software licensed under the MIT license.