Skip to content

Commit 23bca44

Browse files
authored
Merge branch 'develop' into update/installation-of-tools
2 parents 699461e + 6e53579 commit 23bca44

5 files changed

Lines changed: 128 additions & 26 deletions

File tree

README.md

Lines changed: 112 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,115 @@
1-
# admin-tools
2-
EasyEngine Admin Tools For v4
1+
easyengine/admin-tools-command
2+
==============================
33

4-
## Host Location
5-
/opt/easyengine/admin-tools
4+
Command to manage admin tools for php based sites.
65

7-
## docker-compose.yml
86

9-
```
10-
/opt/easyengine/admin-tools:/var/www/html/ee-admin
11-
```
7+
8+
Quick links: [Using](#using) | [Contributing](#contributing) | [Support](#support)
9+
10+
## Using
11+
12+
This package implements the following commands:
13+
14+
### ee admin-tools
15+
16+
Manages admin-tools on a site.
17+
18+
~~~
19+
ee admin-tools
20+
~~~
21+
22+
23+
24+
25+
26+
### ee admin-tools install
27+
28+
Installs admin tools for EasyEngine.
29+
30+
~~~
31+
ee admin-tools install
32+
~~~
33+
34+
**EXAMPLES**
35+
36+
# Install admin tools
37+
$ ee admin-tools install
38+
39+
40+
41+
### ee admin-tools enable
42+
43+
Enables admin tools on site.
44+
45+
~~~
46+
ee admin-tools enable [<site-name>] [--force]
47+
~~~
48+
49+
**OPTIONS**
50+
51+
[<site-name>]
52+
Name of website to enable admin-tools on.
53+
54+
[--force]
55+
Force enabling of admin-tools for a site.
56+
57+
**EXAMPLES**
58+
59+
# Enable admin tools on site
60+
$ ee admin-tools enable example.com
61+
62+
# Force enable admin tools on site
63+
$ ee admin-tools enable example.com --force
64+
65+
66+
67+
### ee admin-tools disable
68+
69+
Disables admin-tools on given site.
70+
71+
~~~
72+
ee admin-tools disable [<site-name>] [--force]
73+
~~~
74+
75+
**OPTIONS**
76+
77+
[<site-name>]
78+
Name of website to disable admin-tools on.
79+
80+
[--force]
81+
Force disabling of admin-tools for a site.
82+
83+
**EXAMPLES**
84+
85+
# Disable admin tools on site
86+
$ ee admin-tools disable example.com
87+
88+
# Force disable admin tools on site
89+
$ ee admin-tools disable example.com --force
90+
91+
## Contributing
92+
93+
We appreciate you taking the initiative to contribute to this project.
94+
95+
Contributing isn’t limited to just code. We encourage you to contribute in the way that best fits your abilities, by writing tutorials, giving a demo at your local meetup, helping other users with their support questions, or revising our documentation.
96+
97+
98+
### Reporting a bug
99+
100+
Think you’ve found a bug? We’d love for you to help us get it fixed.
101+
102+
Before you create a new issue, you should [search existing issues](https://github.com/easyengine/admin-tools-command/issues?q=label%3Abug%20) to see if there’s an existing resolution to it, or if it’s already been fixed in a newer version.
103+
104+
Once you’ve done a bit of searching and discovered there isn’t an open or fixed issue for your bug, please [create a new issue](https://github.com/easyengine/admin-tools-command/issues/new). Include as much detail as you can, and clear steps to reproduce if possible.
105+
106+
### Creating a pull request
107+
108+
Want to contribute a new feature? Please first [open a new issue](https://github.com/easyengine/admin-tools-command/issues/new) to discuss whether the feature is a good fit for the project.
109+
110+
## Support
111+
112+
Github issues aren't for general support questions, but there are other venues you can try: https://easyengine.io/support/
113+
114+
115+
*This README.md is generated dynamically from the project's codebase using `ee scaffold package-readme` ([doc](https://github.com/EasyEngine/scaffold-command)). To suggest changes, please submit a pull request against the corresponding part of the codebase.*

composer.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "easyengine/admin-tools-command",
3-
"description": "Commanad to enable disable admin tools for php based sites.",
3+
"description": "Command to manage admin tools for php based sites.",
44
"type": "ee-cli-package",
55
"homepage": "https://github.com/easyengine/amdin-tools",
66
"license": "MIT",
@@ -19,7 +19,10 @@
1919
},
2020
"bundled": true,
2121
"commands": [
22-
"admin-tools"
22+
"admin-tools",
23+
"admin-tools install",
24+
"admin-tools enable",
25+
"admin-tools disable"
2326
]
2427
}
2528
}

src/Admin_Tools_Command.php

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
<?php
22

33
/**
4-
* Enables/Disables admin-tools on a site.
5-
*
6-
* ## EXAMPLES
7-
*
8-
* # Enable admin tools on site
9-
* $ ee admin-tools up example.com
4+
* Manages admin-tools on a site.
105
*
116
* @package ee-cli
127
*/
@@ -35,7 +30,7 @@ class Admin_Tools_Command extends EE_Command {
3530
public function __construct() {
3631

3732
$this->fs = new Filesystem();
38-
define( 'ADMIN_TOOL_DIR', EE_CONF_ROOT . '/admin-tools' );
33+
define( 'ADMIN_TOOL_DIR', EE_ROOT_DIR . '/admin-tools' );
3934
}
4035

4136
/**
@@ -97,13 +92,13 @@ private function install() {
9792
* ## EXAMPLES
9893
*
9994
* # Enable admin tools on site
100-
* $ ee admin-tools up example.com
95+
* $ ee admin-tools enable example.com
10196
*
10297
* # Force enable admin tools on site
103-
* $ ee admin-tools up example.com --force
98+
* $ ee admin-tools enable example.com --force
10499
*
105100
*/
106-
public function up( $args, $assoc_args ) {
101+
public function enable( $args, $assoc_args ) {
107102

108103
\EE\Auth\Utils\init_global_admin_tools_auth();
109104

@@ -159,13 +154,13 @@ public function up( $args, $assoc_args ) {
159154
* ## EXAMPLES
160155
*
161156
* # Disable admin tools on site
162-
* $ ee admin-tools down example.com
157+
* $ ee admin-tools disable example.com
163158
*
164159
* # Force disable admin tools on site
165-
* $ ee admin-tools down example.com --force
160+
* $ ee admin-tools disable example.com --force
166161
*
167162
*/
168-
public function down( $args, $assoc_args ) {
163+
public function disable( $args, $assoc_args ) {
169164

170165
EE\Utils\delem_log( 'admin-tools ' . __FUNCTION__ . ' start' );
171166
$args = auto_site_name( $args, $this->command, __FUNCTION__ );

templates/docker-compose-admin.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ services:
55
php:
66
volumes:
77
- "/opt/easyengine/admin-tools:/var/www/htdocs/ee-admin:ro"
8-
- "/opt/easyengine/ee.sqlite:/opt/easyengine/ee.sqlite:ro"
8+
- "/opt/easyengine/db/ee.sqlite:/opt/easyengine/db/ee.sqlite:ro"
99

1010
nginx:
1111
volumes:
1212
- "/opt/easyengine/admin-tools:/var/www/htdocs/ee-admin:ro"
13-
- "/opt/easyengine/ee.sqlite:/opt/easyengine/ee.sqlite:ro"
13+
- "/opt/easyengine/db/ee.sqlite:/opt/easyengine/db/ee.sqlite:ro"

templates/pma.config.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ $i++;
3030
/* Authentication type */
3131
$cfg['Servers'][$i]['auth_type'] = 'cookie';
3232
/* Server parameters */
33-
$cfg['Servers'][$i]['host'] = 'db';
33+
$cfg['Servers'][$i]['host'] = 'global-db';
3434
$cfg['Servers'][$i]['compress'] = false;
3535
$cfg['Servers'][$i]['AllowNoPassword'] = false;
3636

0 commit comments

Comments
 (0)