Skip to content

Commit 513eb65

Browse files
author
ironex
committed
Add command to fix Filebeat config permissions, update install commands
1 parent f4090d2 commit 513eb65

File tree

5 files changed

+25
-9
lines changed

5 files changed

+25
-9
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ __Currently supported versions of Magento__
7878
### Run already existing Magento project
7979

8080
1) Add existing project
81-
- Paste your existing Magento project to magento folder
81+
- Paste your existing Magento project to magento folder
8282

8383
2) Run ```bin/docker/start```
8484

@@ -116,7 +116,7 @@ Kibana should now be configured to display 5 types of logs: nginx error log (```
116116
### Configure Xdebug
117117

118118
1) Run ```bin/ide/xdebug debug```
119-
- You can turn off Xdebug by running ```bin/ide/xdebug off``` and turn it on again with ```bin/ide/xdebug debug```, you can also use this command to set all other Xdebug modes (https://xdebug.org/docs/all_settings#mode)
119+
- You can turn off Xdebug by running ```bin/ide/xdebug off``` and turn it on again with ```bin/ide/xdebug debug```, you can also use this command to set all other Xdebug modes (https://xdebug.org/docs/all_settings#mode)
120120
2) PhpStorm should offer you automatic setup after you add breakpoint and make http request (open magento.local in a browser) and correct settings should be similar to this:
121121

122122
Preferences - PHP - Debug
@@ -130,17 +130,17 @@ Preferences - PHP - Servers
130130
## Command Reference
131131

132132
- ``` bin/docker/build ```
133-
- Build all images for services defined in docker-compose.yml file
133+
- Build all images for services defined in docker-compose.yml file
134134
- Accepts service name/s as argument/s in case you want to build one or more specific services
135135
- ``` bin/docker/cleanup ```
136136
- Stop and remove all containers, images and volumes of the project
137137
- ``` bin/docker/restart ```
138138
- Restart all services (containers) defined within docker-compose file
139139
- Accepts service name/s as argument/s in case you want to restart one or more specific services
140-
- ``` bin/docker/start ```
140+
- ``` bin/docker/start ```
141141
- Start all services (containers) defined within docker-compose file
142142
- Accepts service name/s as argument/s in case you want to start one or more specific services
143-
- ``` bin/docker/stop ```
143+
- ``` bin/docker/stop ```
144144
- Stop all services (containers) defined within docker-compose file
145145
- Accepts service name/s as argument/s in case you want to stop one or more specific services
146146
- ``` bin/docker/variables ```
@@ -168,3 +168,5 @@ Preferences - PHP - Servers
168168

169169
- If elasticsearch container randomly stops working, then it is probably running out of RAM. Allocate more RAM to Docker Desktop and/or increase Xmx2g value specified in elasticsearch service configuration in docker-compose.yml and restart the container
170170
- You might encounter permission issues if you manually delete one of bind mounted folders, because docker will automatically recreate them with root permissions, which means, that your containers won't have write access to them, because all containers are running in rootless mode.
171+
- If filebeat container stops with the error below, then remove the container and run bin/helpers/ffp and then bin/docker/start
172+
- ```Exiting: error loading config file: config file ("filebeat.yml") can only be writable by the owner but the permissions are "-rw-rw-r--" (to fix the permissions use: 'chmod go-w /usr/share/filebeat/filebeat.yml')```

bin/docker/cleanup

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
. bin/docker/variables
44

5-
# Stop running containers, remove images and volumes
6-
sh bin/docker/stop -v --rmi all
5+
# Stop running containers and remove images (-v parameter can be added to also remove volumes)
6+
sh bin/docker/stop --rmi all "$@"
77

88
# Remove stopped containers
99
docker-compose rm

bin/helpers/ffp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
# Fix Filebeat configuration file permissions - filebeat.yml can only be writtable by the owner
4+
5+
chmod 755 docker/filebeat/filebeat.yml

bin/new-project/magento

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ while true; do
1717
esac
1818
done
1919

20+
# Stop running containers
21+
bin/docker/stop
22+
23+
# Fix filebeat.yml permissions
24+
bin/helpers/ffp
25+
2026
# Cleanup Magento folder
2127
bin/helpers/cmf
2228

@@ -78,4 +84,4 @@ echo "Mailhog has been configured."
7884
bin/magento config:set admin/security/use_form_key 0
7985
echo "Secret key in admin urls was disabled."
8086

81-
bin/magento cache:flush
87+
bin/magento cache:flush

bin/new-project/vsf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
. bin/docker/variables
44

5+
# Stop running containers
6+
bin/docker/stop
7+
58
# Cleanup frontend folder
69
bin/helpers/cff
710

@@ -18,4 +21,4 @@ mv /home/node/temp/frontend/* /home/node/frontend && \
1821
rm -rf /home/node/temp && \
1922
cd /home/node/frontend && \
2023
yarn install && \
21-
yarn dev"
24+
yarn dev"

0 commit comments

Comments
 (0)