* move hooks to bash

* add yml allow dir in storage/app
+ slow log options for mariadb
* nvm fix in workspace build instructions
This commit is contained in:
2020-07-16 23:39:44 +03:00
parent 4b434f2268
commit 88490afe77
10 changed files with 18 additions and 8 deletions

View File

@ -1,3 +1,3 @@
#!/bin/bash
cd $HOME/docker-compose-projects/structure
cd $HOME/structure
docker-compose exec workspace su laradock

View File

@ -1,3 +1,3 @@
#!/bin/bash
cd $HOME/docker-compose-projects/structure
cd $HOME/structure
docker-compose exec db mysql -u root -p123456

3
bash/quit-xdebug.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
cd $HOME/structure
./dockerfiles/php-fpm/xdebug.sh stop && cd

View File

@ -1,3 +1,3 @@
#!/bin/bash
cd $HOME/docker-compose-projects/structure
cd $HOME/structure
docker-compose exec web nginx -s reload

3
bash/start-xdebug.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
cd $HOME/structure
./dockerfiles/php-fpm/xdebug.sh start && cd

3
config/mariadb/slow.cnf Normal file
View File

@ -0,0 +1,3 @@
[mariadb]
general_log
general_log_file=/var/log/mariadb/mariadb.log

View File

@ -16,6 +16,7 @@
## Let nginx return 404 if static file not exists
location ~ ^/storage/app/uploads/public { try_files $uri /404; }
location ~ ^/storage/app/media { try_files $uri /404; }
location ~ ^/storage/app/yml { try_files $uri /404; }
location ~ ^/files { try_files $uri /404; }
location ~ ^/storage/app/.*\.xls { try_files $uri /404; }
location ~ ^/storage/temp/public { try_files $uri /404; }

View File

@ -259,6 +259,8 @@ RUN if [ ${INSTALL_FSWATCH} = true ]; then \
# Node / NVM:
###########################################################################
USER laradock
# Check if NVM needs to be installed
ARG INSTALL_NODE=false
ENV INSTALL_NODE ${INSTALL_NODE}
@ -310,8 +312,10 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
USER root
RUN if [ ${INSTALL_NODE} = true ]; then \
cp -R /home/laradock/.nvm /root/ && \
chown -R root:root /root/.nvm && \
echo "" >> ~/.bashrc && \
echo 'export NVM_DIR="/home/laradock/.nvm"' >> ~/.bashrc && \
echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bashrc && \
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
;fi

View File

@ -1,2 +0,0 @@
#!/bin/bash
cd docker-compose-projects/structure/ && ./dockerfiles/php-fpm/xdebug.sh stop && cd

View File

@ -1,2 +0,0 @@
#!/bin/bash
cd docker-compose-projects/structure/ && ./dockerfiles/php-fpm/xdebug.sh start && cd