From 9875842e02d9833b3114183c5768941189a88c9e Mon Sep 17 00:00:00 2001 From: Amr Aly Date: Fri, 4 Sep 2020 15:18:48 -0500 Subject: [PATCH 1/4] Add DOWNGRADE_OPENSSL_TLS_AND_SECLEVEL Option --- docker-compose.yml | 1 + php-fpm/Dockerfile | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 883e244c..9d272eac 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -243,6 +243,7 @@ services: - INSTALL_WKHTMLTOPDF=${PHP_FPM_INSTALL_WKHTMLTOPDF} - INSTALL_XHPROF=${PHP_FPM_INSTALL_XHPROF} - INSTALL_XMLRPC=${PHP_FPM_INSTALL_XMLRPC} + - DOWNGRADE_OPENSSL_TLS_AND_SECLEVEL=${PHP_DOWNGRADE_OPENSSL_TLS_AND_SECLEVEL} - PUID=${PHP_FPM_PUID} - PGID=${PHP_FPM_PGID} - LOCALE=${PHP_FPM_DEFAULT_LOCALE} diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 07443f20..ae867046 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -916,6 +916,18 @@ RUN if [ ${INSTALL_XMLRPC} = true ]; then \ docker-php-ext-install xmlrpc \ ;fi +########################################################################### +# Downgrade Openssl: +########################################################################### + +ARG DOWNGRADE_OPENSSL_TLS_AND_SECLEVEL=false + +RUN if [ ${DOWNGRADE_OPENSSL_TLS_AND_SECLEVEL} = true ]; then \ + sed -i 's,^\(MinProtocol[ ]*=\).*,\1'TLSv1.2',g' /etc/ssl/openssl.cnf \ + && \ + sed -i 's,^\(CipherString[ ]*=\).*,\1'DEFAULT@SECLEVEL=1',g' /etc/ssl/openssl.cnf\ +;fi + ########################################################################### # Check PHP version: ########################################################################### From c06958d0668d5ccb59544d2ed2a8f8d619fdd2b2 Mon Sep 17 00:00:00 2001 From: tancou Date: Sat, 19 Sep 2020 14:13:04 +0200 Subject: [PATCH 2/4] Add ZSH suggestions and aliases --- DOCUMENTATION/content/documentation/index.md | 20 ++++++++++++++++++++ docker-compose.yml | 2 ++ env-example | 2 ++ workspace/Dockerfile | 19 ++++++++++++++++++- 4 files changed, 42 insertions(+), 1 deletion(-) diff --git a/DOCUMENTATION/content/documentation/index.md b/DOCUMENTATION/content/documentation/index.md index 89e5da37..c51a05d1 100644 --- a/DOCUMENTATION/content/documentation/index.md +++ b/DOCUMENTATION/content/documentation/index.md @@ -2284,6 +2284,26 @@ For configuration information, visit the [bash-git-prompt repository](https://gi **Note** You can configure Oh My ZSH by editing the `/home/laradock/.zshrc` in running container. +> With the ZSH autosuggestions plugin. + +[ZSH autosuggestions plugin](https://github.com/zsh-users/zsh-autosuggestions) suggests commands as you type based on history and completions. + +1 - Enable ZSH as described previously + +2 - Set `SHELL_OH_MY_ZSH_AUTOSUGESTIONS` to `true` + +3 - Rebuild and use ZSH as described previously + +> With bash aliases loaded. + +Laradock provides aliases through the `aliases.sh` file located in the `laradock/workspace` directory. You can load it into ZSH. + +1 - Enable ZSH as described previously + +2 - Set `SHELL_OH_MY_ZSH_ALIASES` to `true` + +3 - Rebuild and enjoy aliases +
## PHPStorm Debugging Guide diff --git a/docker-compose.yml b/docker-compose.yml index efdfef9e..f976b5a0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -63,6 +63,8 @@ services: args: - CHANGE_SOURCE=${CHANGE_SOURCE} - SHELL_OH_MY_ZSH=${SHELL_OH_MY_ZSH} + - SHELL_OH_MY_ZSH_AUTOSUGESTIONS=${SHELL_OH_MY_ZSH_AUTOSUGESTIONS} + - SHELL_OH_MY_ZSH_ALIASES=${SHELL_OH_MY_ZSH_ALIASES} - UBUNTU_SOURCE=${UBUNTU_SOURCE} - BASE_IMAGE_TAG_PREFIX=${WORKSPACE_BASE_IMAGE_TAG_PREFIX} - LARADOCK_PHP_VERSION=${PHP_VERSION} diff --git a/env-example b/env-example index 9e441836..1209d24b 100644 --- a/env-example +++ b/env-example @@ -83,6 +83,8 @@ DOCKER_SYNC_STRATEGY=native_osx # If you want to use "Oh My ZSH!" with Laravel autocomplete plugin, set SHELL_OH_MY_ZSH to true. SHELL_OH_MY_ZSH=false +SHELL_OH_MY_ZSH_AUTOSUGESTIONS=false +SHELL_OH_MY_ZSH_ALIASES=false ########################################################### ################ Containers Customization ################# diff --git a/workspace/Dockerfile b/workspace/Dockerfile index c0279b0d..2d0a70dd 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -1424,6 +1424,9 @@ RUN if [ ${SHELL_OH_MY_ZSH} = true ]; then \ apt install -y zsh \ ;fi +ARG SHELL_OH_MY_ZSH_AUTOSUGESTIONS=false +ARG SHELL_OH_MY_ZSH_ALIASES=false + USER laradock RUN if [ ${SHELL_OH_MY_ZSH} = true ]; then \ sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh) --keep-zshrc" && \ @@ -1439,7 +1442,21 @@ bindkey "^[[3~" delete-char\n\ bindkey "^[[4~" end-of-line\n\ bindkey "^[[5~" up-line-or-history\n\ bindkey "^[[6~" down-line-or-history\n\ -bindkey "^?" backward-delete-char\n' >> /home/laradock/.zshrc \ +bindkey "^?" backward-delete-char\n' >> /home/laradock/.zshrc && \ + if [ ${SHELL_OH_MY_ZSH_AUTOSUGESTIONS} = true ]; then \ + sh -c "git clone https://github.com/zsh-users/zsh-autosuggestions /home/laradock/.oh-my-zsh/custom/plugins/zsh-autosuggestions" && \ + sed -i 's~plugins=(~plugins=(zsh-autosuggestions ~g' /home/laradock/.zshrc && \ + sed -i '1iZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20' /home/laradock/.zshrc && \ + sed -i '1iZSH_AUTOSUGGEST_STRATEGY=(history completion)' /home/laradock/.zshrc && \ + sed -i '1iZSH_AUTOSUGGEST_USE_ASYNC=1' /home/laradock/.zshrc && \ + sed -i '1iTERM=xterm-256color' /home/laradock/.zshrc \ + ;fi && \ + if [ ${SHELL_OH_MY_ZSH_ALIASES} = true ]; then \ + echo "" >> /home/laradock/.zshrc && \ + echo "# Load Custom Aliases" >> /home/laradock/.zshrc && \ + echo "source /home/laradock/aliases.sh" >> /home/laradock/.zshrc && \ + echo "" >> /home/laradock/.zshrc \ + ;fi \ ;fi USER root From 27585c5927069bfd077bed6a898d10eee0258c41 Mon Sep 17 00:00:00 2001 From: Noud de Brouwer Date: Sun, 20 Sep 2020 00:54:33 +0200 Subject: [PATCH 3/4] sqs --- DOCUMENTATION/content/introduction/index.md | 1 + docker-compose.yml | 14 ++++++++++++++ env-example | 5 +++++ sqs/Dockerfile | 7 +++++++ 4 files changed, 27 insertions(+) create mode 100644 sqs/Dockerfile diff --git a/DOCUMENTATION/content/introduction/index.md b/DOCUMENTATION/content/introduction/index.md index 6479dad3..318226c1 100644 --- a/DOCUMENTATION/content/introduction/index.md +++ b/DOCUMENTATION/content/introduction/index.md @@ -134,6 +134,7 @@ That's it! enjoy :) - PHP Worker - Laravel Horizon - Gearman + - Amazon Simple Queue Service - **Mail Servers:** - Mailu diff --git a/docker-compose.yml b/docker-compose.yml index efdfef9e..3477b26c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -663,6 +663,20 @@ services: networks: - backend +### SQS ############################################# + sqs: + build: ./sqs + ports: + - "${SQS_NODE_HOST_PORT}:9324" + - "${SQS_MANAGEMENT_HTTP_HOST_PORT}:9325" + privileged: true + hostname: laradock-sqs + volumes: + - ${DATA_PATH_HOST}/sqs:/opt/custom + networks: + - frontend + - backend + ### RabbitMQ ############################################# rabbitmq: build: ./rabbitmq diff --git a/env-example b/env-example index 9e441836..831f4206 100644 --- a/env-example +++ b/env-example @@ -365,6 +365,11 @@ POSTGRES_PASSWORD=secret POSTGRES_PORT=5432 POSTGRES_ENTRYPOINT_INITDB=./postgres/docker-entrypoint-initdb.d +### SQS ############################################## + +SQS_NODE_HOST_PORT=9324 +SQS_MANAGEMENT_HTTP_HOST_PORT=9325 + ### RABBITMQ ############################################## RABBITMQ_NODE_HOST_PORT=5672 diff --git a/sqs/Dockerfile b/sqs/Dockerfile new file mode 100644 index 00000000..2b43a223 --- /dev/null +++ b/sqs/Dockerfile @@ -0,0 +1,7 @@ +FROM roribio16/alpine-sqs + +LABEL maintainer="Ronald E. Oribio R. https://github.com/roribio" + +ENTRYPOINT ["bash", "-c", "/usr/bin/supervisord"] + +EXPOSE 9324 9325 From 17079941ef0d475a3a5291b69c45c97510b9a87f Mon Sep 17 00:00:00 2001 From: Noud de Brouwer Date: Mon, 21 Sep 2020 01:53:00 +0200 Subject: [PATCH 4/4] mailcatcher casting --- DOCUMENTATION/content/introduction/index.md | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DOCUMENTATION/content/introduction/index.md b/DOCUMENTATION/content/introduction/index.md index 01b148e9..39a5c99d 100644 --- a/DOCUMENTATION/content/introduction/index.md +++ b/DOCUMENTATION/content/introduction/index.md @@ -137,7 +137,7 @@ That's it! enjoy :) - **Mail Servers:** - Mailu - - Mailcatcher + - MailCatcher - Mailhog - MailDev diff --git a/docker-compose.yml b/docker-compose.yml index fd9af97d..490c4163 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -921,7 +921,7 @@ services: networks: - frontend -### Mailcatcher ################################################ +### MailCatcher ################################################ mailcatcher: build: ./mailcatcher ports: