Browse Source

* move hooks to bash

* add yml allow dir in storage/app
+ slow log options for mariadb
* nvm fix in workspace build instructions
master
parent
commit
88490afe77
  1. 2
      bash/enter-to-workspace.sh
  2. 2
      bash/mysql.sh
  3. 3
      bash/quit-xdebug.sh
  4. 2
      bash/restart-nginx.sh
  5. 3
      bash/start-xdebug.sh
  6. 3
      config/mariadb/slow.cnf
  7. 1
      config/nginx/includes.d/octobercms.conf
  8. 6
      dockerfiles/workspace/Dockerfile
  9. 2
      hooks/quit-xdebug.sh
  10. 2
      hooks/start-xdebug.sh

2
hooks/enter-to-workspace.sh → bash/enter-to-workspace.sh

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

2
hooks/mysql.sh → bash/mysql.sh

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

3
bash/quit-xdebug.sh

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

2
hooks/restart-nginx.sh → bash/restart-nginx.sh

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

3
bash/start-xdebug.sh

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

3
config/mariadb/slow.cnf

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

1
config/nginx/includes.d/octobercms.conf

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

6
dockerfiles/workspace/Dockerfile

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

2
hooks/quit-xdebug.sh

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

2
hooks/start-xdebug.sh

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