Install Easyengine WordPress on a Debian 10 VM (mine was a KVM).
The following procedure will install EE with following components;
- Docker
- WordPress Core
- MariaDB
- Nginx Server PHP-FPM
- Redis Cache
- Let’s encrypt SSL
Install EasyEngine on Linux
wget -qO ee rt.cx/ee4 && sudo bash ee ee site create your_domain --type=wp --ssl=le --cache
For detailed installation or customizing your requirement, you may visit- https://easyengine.io/commands/site/create/
Enable EE Admin:
ee admin-tools enable your_domain
By default, we enable auth on admin-tools. To view username/password with which you can login, run
ee auth list global
Then navigate to example.com/ee-admin/ in the browser. There you’ll see a list of admin-tools.
You can find database & wp-admin access credentials for example.com by running:
$ ee site info example.com
+--------------------+--------------------------------+ | Site | https://example.com | +--------------------+--------------------------------+ | Access admin-tools | https://example.com/ee-admin/ | +--------------------+--------------------------------+ | Site Title | example.com | +--------------------+--------------------------------+ | WordPress Username | example.com-K8FzH | +--------------------+--------------------------------+ | WordPress Password | q27eGm5pYRe2 | +--------------------+--------------------------------+ | DB Host | global-db | +--------------------+--------------------------------+ | DB Name | example_com | +--------------------+--------------------------------+ | DB User | example.com-c1O1a7 | +--------------------+--------------------------------+ | DB Password | dg5T9GNhr4Ah | +--------------------+--------------------------------+ | E-Mail | admin@example.com | +--------------------+--------------------------------+ | SSL | Enabled | +--------------------+--------------------------------+ | SSL Wildcard | No | +--------------------+--------------------------------+ | Cache | None | +--------------------+--------------------------------+
So in this case:
- Server would be global-db.
- Username would be example.com-c1O1a7.
- Password would be dg5T9GNhr4Ah.
- You can access phpMyAdmin at example.com/ee-admin/pma
All sites will be created in /opt/easyengine/sites/ by default.
For a site like example.com, the site’s root folder will be /opt/easyengine/sites/example.com
Here’s how your a site’s structure will look like if it’s a PHP or WordPress site. HTML site won’t have php and postfix directories anywhere in them.
. ├── app │ ├── htdocs │ └── wp-config.php ├── config │ ├── nginx │ ├── php │ └── postfix ├── docker-compose-admin.yml ├── docker-compose.yml ├── logs │ ├── nginx │ └── php └── services ├── postfix ├── mariadb │ ├── conf │ ├── data │ └── logs Source Code Source code of your site is stored in /opt/easyengine/sites/example.com/app/htdocs.
In case of WordPress site, the wp-config.php file placed in app folder at
/opt/easyengine/sites/example.com/app/wp-config.php for security reasons.
Configuration
All config of a site is stored in /opt/easyengine/sites/example.com/config/
Config Type Path on host
Nginx config /opt/easyengine/sites/example.com/config/nginx/ Nginx custom config /opt/easyengine/sites/example.com/config/nginx/custom/ PHP config /opt/easyengine/sites/example.com/config/php/php/ PHP-FPM config /opt/easyengine/sites/example.com/config/php/php-fpm.d/ Postfix config /opt/easyengine/sites/example.com/config/postfix/ Local DB config /opt/easyengine/sites/example.com/services/mariadb/conf Logs
All logs related to a site are stored in /opt/easyengine/sites/example.com/logs/
Log Type Path on host
Nginx /opt/easyengine/sites/example.com/logs/nginx/ PHP /opt/easyengine/sites/example.com/logs/php/ Local DB /opt/easyengine/sites/example.com/services/mariadb/logs
Docker Compose
You may notice two more files – docker-compose.yml and docker-compose-admin.yml. This files are used by Docker to configure software stack for the site and that site’s admin-tools respectively.
If you are familiar with the Docker, you can use these files to modify software stack used by a site among other things.
MySQL Root Access
If you want root access to MySQL’s root account, you can run the following command for now. We’ll add a command for it in later EasyEngine releases:
cd /opt/easyengine/services && docker-compose exec global-db bash -c 'mysql -uroot -p${MYSQL_ROOT_PASSWORD}'
If you need additional database to create (like me, as I wanted to migrate my existing wp site).
Create the database and grant access to mysql user of site to that database.
GRANT ALL PRIVILEGES ON database_name.* TO 'username'@'%';
Updating EasyEngine
Updating easyengine is not so easy. It seems the development team still needs a lot to improve. Details can be explored here- https://easyengine.io/commands/site/update/
Src: