From f661694a81da5577cb784c28a100c5fe37eeca49 Mon Sep 17 00:00:00 2001 From: reishou Date: Sun, 4 Jun 2023 22:12:34 +0700 Subject: [PATCH 1/2] feat: add mailpit --- .env.example | 4 ++++ DOCUMENTATION/content/documentation/index.md | 23 ++++++++++++++++++++ docker-compose.yml | 10 +++++++++ mailpit/Dockerfile | 3 +++ 4 files changed, 40 insertions(+) create mode 100644 mailpit/Dockerfile diff --git a/.env.example b/.env.example index 564790b..60826bd 100644 --- a/.env.example +++ b/.env.example @@ -1079,3 +1079,7 @@ KEYCLOAK_POSTGRES_HOST=postgres KEYCLOAK_POSTGRES_USER=laradock_keycloak KEYCLOAK_POSTGRES_PASSWORD=laradock_keycloak KEYCLOAK_POSTGRES_DB=laradock_keycloak + +### Mailpit ################################################# +MAILPIT_HTTP_PORT=8125 +MAILPIT_SMTP_PORT=1125 diff --git a/DOCUMENTATION/content/documentation/index.md b/DOCUMENTATION/content/documentation/index.md index f21be32..4faa720 100644 --- a/DOCUMENTATION/content/documentation/index.md +++ b/DOCUMENTATION/content/documentation/index.md @@ -1507,6 +1507,29 @@ docker-compose up -d keycloak - Username: `admin` - Password: `secret` + +
+ +## Use Mailpit + +1. Run the Mailpit Container (`mailpit`) with the `docker-compose up` command. Example: + +```bash +docker-compose up -d mailpit +``` + +2. Open your browser and visit the localhost on port 8125: `http://localhost:8125` +3. Setup config in your Laravel project’s .env file +```text +MAIL_MAILER=smtp +MAIL_HOST=mailpit +MAIL_PORT=1125 +MAIL_USERNAME=null +MAIL_PASSWORD=null +``` + + +
diff --git a/docker-compose.yml b/docker-compose.yml index 8c96db9..906d25a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1156,6 +1156,16 @@ services: - frontend - backend +### Mailpit ############################################## + mailpit: + build: ./mailpit + ports: + - "${MAILPIT_HTTP_PORT}:8025" + - "${MAILPIT_SMTP_PORT}:1025" + networks: + - frontend + - backend + ### Selenium ############################################### selenium: build: ./selenium diff --git a/mailpit/Dockerfile b/mailpit/Dockerfile new file mode 100644 index 0000000..a085891 --- /dev/null +++ b/mailpit/Dockerfile @@ -0,0 +1,3 @@ +FROM axllent/mailpit + +LABEL maintainer="reishou " From 2cc022b112e825330a72e8e526cbc4841f57451b Mon Sep 17 00:00:00 2001 From: Andre Kutianski Date: Sat, 10 Jun 2023 19:01:44 -0300 Subject: [PATCH 2/2] fix: oci8 fails install on PHP 8.1 Oracle OCI8 fails to install on PHP 8.1 due the new release available, created conditional to check compatibility. --- php-fpm/Dockerfile | 2 ++ workspace/Dockerfile | 2 ++ 2 files changed, 4 insertions(+) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 23f2c33..2ea04eb 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -637,6 +637,8 @@ RUN if [ ${INSTALL_OCI8} = true ]; then \ echo 'instantclient,/opt/oracle/instantclient_${ORACLE_INSTANT_CLIENT_VERSION}/' | pecl install oci8-2.2.0; \ elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ] && [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \ echo "instantclient,/opt/oracle/instantclient_${ORACLE_INSTANT_CLIENT_VERSION}/" | pecl install oci8-3.0.1; \ + elif [ $(php -r "echo PHP_MAJOR_VERSION . PHP_MINOR_VERSION;") = "81" ]; then \ + echo "instantclient,/opt/oracle/instantclient_${ORACLE_INSTANT_CLIENT_VERSION}/" | pecl install oci8-3.2.1; \ else \ echo "instantclient,/opt/oracle/instantclient_${ORACLE_INSTANT_CLIENT_VERSION}/" | pecl install oci8; \ fi \ diff --git a/workspace/Dockerfile b/workspace/Dockerfile index b4ec4b5..f0f9ba3 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -962,6 +962,8 @@ RUN if [ ${INSTALL_OCI8} = true ]; then \ echo 'instantclient,/opt/oracle/instantclient_${ORACLE_INSTANT_CLIENT_VERSION}/' | pecl install oci8-2.2.0; \ elif [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "80000" ]; then \ echo "instantclient,/opt/oracle/instantclient_${ORACLE_INSTANT_CLIENT_VERSION}/" | pecl install oci8-3.0.1; \ + elif [ $(php -r "echo PHP_MAJOR_VERSION . PHP_MINOR_VERSION;") = "81" ]; then \ + echo "instantclient,/opt/oracle/instantclient_${ORACLE_INSTANT_CLIENT_VERSION}/" | pecl install oci8-3.2.1; \ else \ echo "instantclient,/opt/oracle/instantclient_${ORACLE_INSTANT_CLIENT_VERSION}/" | pecl install oci8; \ fi \