Skip to content

Commit 69d3ced

Browse files
author
Evgenii Mykhalichenko
committed
Rebuild and big update
1 parent 763f641 commit 69d3ced

27 files changed

+129
-12
lines changed

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ help:
1616
@echo "Commands:"
1717
@echo " init Init skeleton settings"
1818
@echo " help List of all commands in make file"
19+
@echo " install Install application"
20+
@echo " add-host Add nginx host to /etc/hosts file"
21+
@echo " bash Exec backend container"
22+
@echo " build Build docker-compose"
23+
@echo " build-no-cache Build docker-compose without cache"
24+
@echo " up Up with demon docker containers"
25+
@echo " down Down docker containers"
26+
@echo " stop Stop docker containers"
1927
@echo " clear-all-logs Clear all logs in folder /logs"
2028
@echo " clear-logs-in folder=[FOLDER] Clear logs in folder"
2129
@echo " watch-log logFilePath=[PATH TO LOG FILE] Watch log file"
@@ -26,6 +34,10 @@ init:
2634
cp .env_example .env; \
2735
fi
2836

37+
# make install project
38+
install: add-host build up
39+
@${DOCKER} exec -it "${DOCKER_PREFIX}-backend" composer install;
40+
2941
# add nginx host to /etc/hosts file
3042
add-host:
3143
SERVICES=$$(command -v getent > /dev/null && echo "getent ahostsv4" || echo "dscacheutil -q host -a name"); \

README.md

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,31 +27,43 @@ To install, you need to install docker locally.
2727
* [Docker Compose](https://docs.docker.com/compose/)
2828
* [Docker Machine](https://docs.docker.com/machine/) (Mac and Windows only)
2929

30+
### Before start work
31+
32+
To run the docker commands without using **sudo** you must add the **docker** group to **your-user**:
33+
34+
```bash
35+
sudo usermod -aG docker your-user
36+
```
37+
38+
For now, this project has been mainly created for Unix `(Linux/MacOS)`. Perhaps it could work on Windows.
39+
3040
### How start work
3141

3242
Clone current project:
3343
```bash
3444
git clone https://github.com/krepysh-spec/lamp-docker-php-skeleton.git && cd lamp-docker-php-skeleton
3545
````
46+
3647
Create .env file from .env_example:
3748
```bash
3849
cp .env_example .env
3950
````
40-
Fill configuration in .env file
41-
42-
To run the docker commands without using **sudo** you must add the **docker** group to **your-user**:
43-
51+
or
4452
```bash
45-
sudo usermod -aG docker your-user
46-
```
53+
make init
54+
````
4755

48-
For now, this project has been mainly created for Unix `(Linux/MacOS)`. Perhaps it could work on Windows.
56+
Fill configuration in .env file
4957

58+
Run bottom command for install application
5059
```bash
51-
docker-compose build && docker-compose up
60+
make install
5261
```
5362

54-
After open in browser [localhost](http://127.0.0.1/)
63+
If you not change ***NGINX_HOST*** and ***NGINX_PORT*** in ***.env*** open in browser [localhost](http://127.0.0.1/)
64+
65+
And you should see something like:
66+
![Alt Text](docs/media/result.png)
5567

5668
### Makefile
5769
This file helps to quickly interact with the work of docker and additional features.
@@ -62,6 +74,14 @@ usage: make COMMAND
6274
Commands:
6375
init Init skeleton settings
6476
help List of all commands in make file
77+
install Install application
78+
add-host Add nginx host to /etc/hosts file
79+
bash Exec backend container
80+
build Build docker-compose
81+
build-no-cache Build docker-compose without cache
82+
up Up with demon docker containers
83+
down Down docker containers
84+
stop Stop docker containers
6585
clear-all-logs Clear all logs in folder /logs
6686
clear-logs-in folder=[FOLDER] Clear logs in folder
6787
watch-log logFilePath=[PATH TO LOG FILE] Watch log file
@@ -74,8 +94,6 @@ Commands:
7494
├── docker - [Docker settings]
7595
│   ├── backend
7696
│   │   ├── Dockerfile
77-
│   │   ├── cron
78-
│   │   │   └── crontab
7997
│   │   ├── php
8098
│   │   │   └── conf.d
8199
│   │   │   ├── php.ini
@@ -94,6 +112,14 @@ Commands:
94112
└── src - [Your workspace]
95113
```
96114
115+
### More documentation
116+
You can also read more information about the project
117+
118+
| Doc | README |
119+
|----------------------------|--------------------------------------------|
120+
| xDebug configuration | [docs/xdebug.md](docs/xdebug.md) |
121+
| Code sniffer configuration | [docs/codesniffer.md](docs/codesniffer.md) |
122+
97123
### Support
98124
99125
For support, email evgeniymykhalichenko@gmail.com or telegram @krep1sh

docs/codesniffer.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Setup PHP_CodeSniffer in phpStorm
2+
The package - [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer)
3+
4+
CodeSniffer load coding standards from file ***phpcs.xml***
5+
6+
- In the ***Settings/Preferences***, navigate to ***PHP | Quality Tools***.
7+
- On the Quality Tools page that opens, expand the PHP_CodeSniffer area and click the Browse button next to the Configuration list.
8+
- In the PHP_CodeSniffer dialog that opens, empty the PHP_CodeSniffer path field.
9+
![Alt Text](media/codesniffer/codesniffer1.png)
10+
![Alt Text](media/codesniffer/codesniffer2.png)
11+
![Alt Text](media/codesniffer/codesniffer3.png)
12+
![Alt Text](media/codesniffer/codesniffer4.png)
13+
- Result
14+
![Alt Text](media/codesniffer/codesniffer5.png)
15+
158 KB
Loading
291 KB
Loading
137 KB
Loading
451 KB
Loading
115 KB
Loading

docs/media/result.png

175 KB
Loading

docs/media/xdebug/xdebug1.png

490 KB
Loading

0 commit comments

Comments
 (0)