Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 466dbca

Browse files
Documentation improvement
1 parent bc685cf commit 466dbca

File tree

2 files changed

+52
-26
lines changed

2 files changed

+52
-26
lines changed

‎README.md‎

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ Docker running Nginx, PHP-FPM, Composer, MySQL and PHPMyAdmin.
1212

1313
We’ll download the code from its repository on GitHub.
1414

15-
3. [Configure Nginx With SSL Certificates](#configure-nginx-with-ssl-certificates) [Optional]
15+
3. [Configure Nginx With SSL Certificates](#configure-nginx-with-ssl-certificates) [`Optional`]
1616

1717
We'll generate and configure SSL certificate for nginx before running server.
1818

19-
4. [Configure Xdebug](#configure-xdebug) [Optional]
19+
4. [Configure Xdebug](#configure-xdebug) [`Optional`]
2020

2121
We'll configure Xdebug for IDE (PHPStorm or Netbeans).
2222

2323
5. [Run the application](#run-the-application)
2424

2525
By this point we’ll have all the project pieces in place.
2626

27-
6. [Use Makefile](#use-makefile) [Optional]
27+
6. [Use Makefile](#use-makefile) [`Optional`]
2828

2929
When developing, you can use `Makefile` for doing recurrent operations.
3030

@@ -225,20 +225,20 @@ ___
225225

226226
When developing, you can use [Makefile](https://en.wikipedia.org/wiki/Make_(software)) for doing the following operations :
227227

228-
| Name | Description |
229-
|---------------|--------------------------------------------|
230-
| apidoc | Generate documentation of API |
231-
| clean | Clean directories for reset |
232-
| code-sniff | Check the API with PHP Code Sniffer (PSR2) |
233-
| composer-up | Update PHP dependencies with composer |
234-
| docker-start | Create and start containers |
235-
| docker-stop | Stop and clear all services |
236-
| gen-certs | Generate SSL certificates for `nginx` |
237-
| logs | Follow log output |
238-
| mysql-dump | Create backup of whole database |
239-
| mysql-restore | Restore backup from whole database |
240-
| phpmd | Analyse the API with PHP Mess Detector |
241-
| test | Test application with phpunit |
228+
| Name | Description |
229+
|---------------|----------------------------------------------|
230+
| apidoc | Generate documentation of API |
231+
| clean | Clean directories for reset |
232+
| code-sniff | Check the API with PHP Code Sniffer (`PSR2`) |
233+
| composer-up | Update PHP dependencies with composer |
234+
| docker-start | Create and start containers |
235+
| docker-stop | Stop and clear all services |
236+
| gen-certs | Generate SSL certificates for `nginx` |
237+
| logs | Follow log output |
238+
| mysql-dump | Create backup of all databases |
239+
| mysql-restore | Restore backup of all databases |
240+
| phpmd | Analyse the API with PHP Mess Detector |
241+
| test | Test application with phpunit |
242242

243243
### Examples
244244

@@ -273,7 +273,7 @@ sudo docker run --rm -v $(pwd)/web/app:/app composer update
273273
### Generating PHP API documentation
274274

275275
```sh
276-
sudo docker-compose exec -T php ./app/vendor/bin/apigen generate app/src --destination ./app/doc
276+
sudo docker-compose exec -T php php -d memory_limit=256M -d xdebug.profiler_enable=0 ./app/vendor/bin/apigen generate app/src --destination ./app/doc
277277
```
278278

279279
### Testing PHP application with PHPUnit
@@ -282,6 +282,12 @@ sudo docker-compose exec -T php ./app/vendor/bin/apigen generate app/src --desti
282282
sudo docker-compose exec -T php ./app/vendor/bin/phpunit --colors=always --configuration ./app/
283283
```
284284

285+
### Fixing standard code with [PSR2](http://www.php-fig.org/psr/psr-2/)
286+
287+
```sh
288+
sudo docker-compose exec -T php ./app/vendor/bin/phpcs -v --standard=PSR2 ./app/src/
289+
```
290+
285291
### Checking the standard code with [PSR2](http://www.php-fig.org/psr/psr-2/)
286292

287293
```sh
@@ -314,7 +320,7 @@ and
314320
mysql -u"$MYSQL_ROOT_USER" -p"$MYSQL_ROOT_PASSWORD"
315321
```
316322

317-
#### Backup of database
323+
#### Creating a backup of all databases
318324

319325
```sh
320326
mkdir -p data/db/dumps
@@ -324,13 +330,7 @@ mkdir -p data/db/dumps
324330
source .env && sudo docker exec $(sudo docker-compose ps -q mysqldb) mysqldump --all-databases -u"$MYSQL_ROOT_USER" -p"$MYSQL_ROOT_PASSWORD" > "data/db/dumps/db.sql"
325331
```
326332

327-
or
328-
329-
```sh
330-
source .env && sudo docker exec $(sudo docker-compose ps -q mysqldb) mysqldump test -u"$MYSQL_ROOT_USER" -p"$MYSQL_ROOT_PASSWORD" > "data/db/dumps/test.sql"
331-
```
332-
333-
#### Restore Database
333+
#### Restoring a backup of all databases
334334

335335
```sh
336336
source .env && sudo docker exec -i $(sudo docker-compose ps -q mysqldb) mysql -u"$MYSQL_ROOT_USER" -p"$MYSQL_ROOT_PASSWORD" < "data/db/dumps/db.sql"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Configure Local CA CERT with MacOS
2+
3+
## 1. The warning you receive while developing locally.
4+
5+
![Warning](images/cacert-1-warning.png)
6+
7+
## 2. Open the keychain app.
8+
9+
![Open Keychain](images/cacert-2-open-keychain.png)
10+
11+
## 3. Use File --> Import to add the ca cert you've already created.
12+
13+
![Add CA Cert](images/cacert-3-add-cacert-file-import.png)
14+
15+
## 4. Once added, locate it via the search box.
16+
17+
![Localhost Search Box](images/cacert-4-locate-cert.png)
18+
19+
## 5. Set to always trust.
20+
21+
![Trust The Cert](images/cacert-5-set-to-always-trust.png)
22+
23+
## 6. Reload the webpage.
24+
25+
![The Results](images/cacert-6-reload-page.png)
26+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /