From 2f9a4eafbc28e64d90348d4b666e6ccab8ba4af9 Mon Sep 17 00:00:00 2001 From: Edi Septriyanto Date: Mon, 31 May 2021 01:38:53 +0700 Subject: [PATCH 1/3] update --- src/docker-compose.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/docker-compose.yml b/src/docker-compose.yml index 47ff82c..405ad57 100644 --- a/src/docker-compose.yml +++ b/src/docker-compose.yml @@ -1,6 +1,6 @@ version: '3' -services: +services: # Application app: build: @@ -42,8 +42,6 @@ services: MYSQL_USER: ${DB_USER} MYSQL_PASSWORD: ${DB_PASS} MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS} - expose: - - 3306 ports: - ${DB_PORT}:3306 command: ['--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci','--default-authentication-plugin=mysql_native_password'] @@ -57,8 +55,6 @@ services: restart: always environment: REDIS_PASSWORD: ${REDIS_PASS} - expose: - - 6379 ports: - ${REDIS_PORT}:6379 @@ -89,7 +85,5 @@ services: image: mailhog/mailhog:latest container_name: ${APP_SID}-mailhog restart: always - expose: - - 1025 ports: - ${MH_PORT}:8025 \ No newline at end of file From 218c964d28313b9695d76169da096a654a95d6ea Mon Sep 17 00:00:00 2001 From: Edi Septriyanto Date: Mon, 31 May 2021 01:39:16 +0700 Subject: [PATCH 2/3] update --- src/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docker-compose.yml b/src/docker-compose.yml index 405ad57..f913535 100644 --- a/src/docker-compose.yml +++ b/src/docker-compose.yml @@ -1,4 +1,4 @@ -version: '3' +version: '3.7' services: # Application From 66509fe5d1827d0ada623fdbd838b6675e340551 Mon Sep 17 00:00:00 2001 From: Edi Septriyanto Date: Mon, 31 May 2021 02:04:41 +0700 Subject: [PATCH 3/3] re-configure --- config/.env.easydock | 3 +++ src/Dockerfile | 3 ++- src/docker-compose.yml | 4 ++++ src/easydock | 17 +++++++++++++++-- 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/config/.env.easydock b/config/.env.easydock index b086719..232c608 100644 --- a/config/.env.easydock +++ b/config/.env.easydock @@ -22,6 +22,9 @@ APP_PORT=8008 # PHP VERSION PHP_VERSION=8.0 +# Nodejs Version +NODE_VERSION=12.18.4 + # MYSQL DB NAME DB_NAME=easydockdb diff --git a/src/Dockerfile b/src/Dockerfile index 35f91bc..0ddf9d6 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -1,5 +1,6 @@ # Dockerfile Args ARG PHP_VERSION +ARG NODE_VERSION # Use PHP image FROM php:${PHP_VERSION}-fpm-alpine @@ -65,7 +66,7 @@ RUN apk update && apk upgrade \ # Install composer && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ # Install node & npm (not yet required for php application) -&& apk add --no-cache nodejs npm yarn \ +&& apk add --update nodejs=${NODE_VERSION} npm yarn \ # Add user && set -eux; \ addgroup -g 1000 -S www; \ diff --git a/src/docker-compose.yml b/src/docker-compose.yml index f913535..0c28e66 100644 --- a/src/docker-compose.yml +++ b/src/docker-compose.yml @@ -8,6 +8,7 @@ services: dockerfile: ${APP_DIR}/.easydock/Dockerfile args: - PHP_VERSION=${PHP_VERSION} + - NODE_VERSION=${NODE_VERSION} - APP_WORKER=${APP_WORKER} container_name: ${APP_SID}-app restart: always @@ -25,6 +26,7 @@ services: image: nginx:alpine container_name: ${APP_SID}-nginx restart: always + tty: true ports: - ${APP_PORT}:80 volumes: @@ -37,6 +39,7 @@ services: image: yobasystems/alpine-mariadb:latest container_name: ${APP_SID}-mysql restart: always + tty: true environment: MYSQL_DATABASE: ${DB_NAME} MYSQL_USER: ${DB_USER} @@ -53,6 +56,7 @@ services: image: redis:alpine container_name: ${APP_SID}-redis restart: always + tty: true environment: REDIS_PASSWORD: ${REDIS_PASS} ports: diff --git a/src/easydock b/src/easydock index 6ae4671..9fd93ed 100755 --- a/src/easydock +++ b/src/easydock @@ -7,8 +7,8 @@ # | Authors : Edi Septriyanto | # | Andrea Pollastri | # | Min. requirement : GNU/Linux Debian 8, Ubuntu 16.04 or Linux Mint 17 | -# | Version : 1.0.3 | -# | Last Update : 14/04/2021 | +# | Version : 1.0.4 | +# | Last Update : 31/05/2021 | # +-------------------------------------------------------------------------+ # | EasyDock-Linux Copyright (c) 2021 MasEDI.Net | # | EasyDock's Logo & Name Copyright (c) Andrea Pollastri | @@ -451,6 +451,14 @@ function ed_conn() { ed_shell } +function ed_sql_shell() { + echo -e "${blue}Wait... ${reset}${br}" + sleep 1s + echo -e "${bgblue}${white} Database Shell ${reset}${br}" + echo -e "Run ${bgwhite}${black} exit ${reset} to return on your Linux shell.${br}" + docker-compose -f ./.easydock/docker-compose.yml --env-file=./.env.easydock exec mysql /bin/bash +} + ############################################################ CLI MENU function ed_cli_menu() { @@ -521,6 +529,11 @@ function ed_cli_menu() { ed_shell exit ;; + sql_shell) + shift + ed_sql_shell + exit + ;; *) shift ed_notfound "${menu}"