Skip to content

Commit bd650b4

Browse files
authored
Merge pull request #5 from joglomedia/linux
Fix typo
2 parents 0282e37 + 62da1e4 commit bd650b4

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Docker and Docker Compose on Linux Distro (Debian, Ubuntu)
3636
```bash
3737
cd /path/to/your-php-application
3838
composer global require joglomedia/easydock-linux
39-
easydock init && easydock export
39+
easydock init && easydock import
4040
```
4141

4242
- Configure your application path into `.env.easydock` file.

src/easydock

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
# | Authors : Edi Septriyanto <me@masedi.net> |
88
# | Andrea Pollastri <andrea@pollastri.dev> |
99
# | Min. requirement : GNU/Linux Debian 8, Ubuntu 16.04 or Linux Mint 17 |
10-
# | Version : 1.0.0 |
11-
# | Last Update : 08/03/2021 |
10+
# | Version : 1.0.1 |
11+
# | Last Update : 26/03/2021 |
1212
# +-------------------------------------------------------------------------+
1313
# | EasyDock-Linux Copyright (c) 2021 MasEDI.Net |
1414
# | EasyDock's Logo & Name Copyright (c) Andrea Pollastri |
@@ -68,10 +68,10 @@ black=$(tput setaf 0)
6868
white=$(tput setaf 7)
6969
red=$(tput setaf 1)
7070
green=$(tput setaf 2)
71-
yellow=$(tput setaf 3)
71+
#yellow=$(tput setaf 3)
7272
blue=$(tput setaf 4)
73-
purple=$(tput setaf 5)
74-
bgblack=$(tput setab 0)
73+
#purple=$(tput setaf 5)
74+
#bgblack=$(tput setab 0)
7575
bgwhite=$(tput setab 7)
7676
bgred=$(tput setab 1)
7777
bggreen=$(tput setab 2)
@@ -125,7 +125,7 @@ function ed_requires_sudo() {
125125

126126
if [[ -n ${CMD} && ${SUDO_CMDS} =~ ${CMD} ]]; then
127127
if [[ "${EUID}" -ne 0 ]]; then
128-
sudo env "HOME=${HOME_PATH}" env "USER=${ED_USER}" ${SOURCE} "$@"
128+
sudo env "HOME=${HOME_PATH}" env "USER=${ED_USER}" "${SOURCE}" "$@"
129129
exit 0
130130
fi
131131
fi
@@ -146,7 +146,7 @@ function ed_init() {
146146
# Generate random easydock's app id.
147147
sed -i 's/APP_SID=easydock/APP_SID=easydock'$(((RANDOM%1000000000)+1))'/g' ./.env.easydock
148148
# Update application image name.
149-
sed -i "s|COMPOSE_PROJECT_NAME=easydock|COMPOSE_PROJECT_NAME=${PWD##*/}|g" ./.env.easydock
149+
sed -i "s|COMPOSE_PROJECT_NAME=easydock|COMPOSE_PROJECT_NAME=${APP_DIR##*/}|g" ./.env.easydock
150150
# Update application directory path.
151151
sed -i "s|APP_DIR=./|APP_DIR=${APP_DIR}|g" ./.env.easydock
152152
# Update easydock directory path.
@@ -172,7 +172,7 @@ function ed_env() {
172172

173173
function ed_import() {
174174
echo -e "${bgyellow}${black}${bold} >>> WARNING! ${reset} This command will overwrite existing config data.${br}"
175-
read -r -p "Are you sure to import easydock config? (Y/n): " -n 1 -r
175+
read -r -p "Are you sure to import easydock's app config? (Y/n): " -n 1 -r
176176

177177
if [[ $REPLY =~ ^[Yy]$ ]]; then
178178
echo -e "${br}${br}${blue}Wait...${reset}${br}"
@@ -192,13 +192,13 @@ function ed_import() {
192192
# Update application directory path.
193193
sed -i "s|APP_DIR=./|APP_DIR=${APP_DIR}|g" ./.env.easydock
194194
# Update application image name.
195-
sed -i "s|COMPOSE_PROJECT_NAME=easydock|COMPOSE_PROJECT_NAME=${PWD##*/}|g" ./.env.easydock
195+
sed -i "s|COMPOSE_PROJECT_NAME=easydock|COMPOSE_PROJECT_NAME=${APP_DIR##*/}|g" ./.env.easydock
196196
# Update easydock directory path.
197197
sed -i "s|ED_DIR=./vendor/joglomedia/easydock-linux|ED_DIR=${ED_DIR}|g" ./.env.easydock
198198

199-
chown -hR ${USER}:${USER} ./.easydock ./.env.easydock
199+
chown -hR "${USER}":"${USER}" ./.easydock ./.env.easydock
200200

201-
echo -e "${bgpurple}${white} easydock is ready! Customize your ${bold}.env.easydock${reset}${bgpurple}${white} file and run ${bold}${ED_CMD} build${reset}${bgpurple}${white} ${br}${reset}"
201+
echo -e "${green}easydock is ready! ${reset}${br}${br}${bgpurple}${white} Customize your ${bold}.env.easydock${reset}${bgpurple}${white} file and run ${bold}${ED_CMD} build${reset}${bgpurple}${white} ${br}${reset}"
202202
else
203203
echo -e "${br}${br}${bgpurple}${white} easydock command cancelled! ${reset}"
204204
fi
@@ -338,7 +338,7 @@ function ed_build() {
338338
sleep 1s
339339
clear
340340
ed_logo
341-
echo -e "${bgpurple}${white} easydock is ready! ${reset}${br}
341+
echo -e "${bggreen}${white} easydock is ready! ${reset}${br}
342342
Now, run ${bgwhite}${black} ${ED_CMD} up ${reset} to kick start your app."
343343
}
344344

@@ -348,15 +348,15 @@ function ed_setup() {
348348

349349
function ed_reset() {
350350
echo -e "${bgyellow}${black}${bold} >>> WARNING! ${reset} This command will reset container and database.${br}"
351-
read -r -p "Are you sure to reset easydock? (Y/n): " -n 1 -r
351+
read -r -p "Are you sure to reset easydock application? (Y/n): " -n 1 -r
352352

353353
if [[ $REPLY =~ ^[Yy]$ ]]; then
354354
echo -e "${br}${br}${blue}Wait...${reset}${br}"
355355
docker-compose -f ./.easydock/docker-compose.yml --env-file=./.env.easydock down -v
356356
docker-compose -f ./.easydock/docker-compose.yml --env-file=./.env.easydock rm
357357
rm -fr ./.easydock/data/*
358358
cp "${ED_DIR}/src/.gitignore.dist" ./.easydock/data/.gitignore
359-
echo -e "${br}${bgpurple}${white} easydock has been reset! ${reset}"
359+
echo -e "${br}${bggreen}${white} easydock has been reset! ${reset}"
360360
else
361361
echo -e "${br}${br}${bgpurple}${white} easydock command cancelled! ${reset}"
362362
fi
@@ -371,9 +371,9 @@ function ed_up() {
371371
docker-compose -f ./.easydock/docker-compose.yml --env-file=./.env.easydock up -d --force-recreate
372372

373373
if [ "${ed_portapp}" == "80" ]; then
374-
echo -e "${br}${bgpurple}${white} easydock has been started... visit ${bold}${underline}http://localhost${reset}${bgpurple}${white} ${reset}${br}"
374+
echo -e "${br}${bgpurple}${white} easydock app has been started... visit ${bold}${underline}http://localhost${reset}${bgpurple}${white} ${reset}${br}"
375375
else
376-
echo -e "${br}${bgpurple}${white} easydock has been started... visit ${bold}${underline}http://localhost:${ed_portapp}${reset}${bgpurple}${white} ${reset}${br}"
376+
echo -e "${br}${bgpurple}${white} easydock app has been started... visit ${bold}${underline}http://localhost:${ed_portapp}${reset}${bgpurple}${white} ${reset}${br}"
377377
fi
378378
}
379379

@@ -382,7 +382,7 @@ function ed_down() {
382382
if [[ $REPLY =~ ^[Yy]$ ]]; then
383383
echo -e "${br}${br}${blue}Wait...${reset}${br}"
384384
docker-compose -f ./.easydock/docker-compose.yml --env-file=./.env.easydock down
385-
echo -e "${br}${bgpurple}${white} easydock has been stopped and containers removed! ${reset}"
385+
echo -e "${br}${bgpurple}${white} easydock app has been stopped and containers removed! ${reset}"
386386
else
387387
echo -e ${br}
388388
fi
@@ -392,18 +392,18 @@ function ed_start() {
392392
echo -e "${blue}Wait...${reset}${br}"
393393
echo -e "${bgblue}${white} Checking required ports ${reset}"
394394
ed_portscheck
395-
echo -e "${br}${bgblue}${white} Starting easydock containers ${reset}${br}"
395+
echo -e "${br}${bgblue}${white} Starting easydock app ${reset}${br}"
396396
docker-compose -f ./.easydock/docker-compose.yml --env-file=./.env.easydock start
397397

398398
if [ "${ed_portapp}" == "80" ]; then
399-
echo -e "${br}${bgpurple}${white} easydock has been started... visit ${bold}${underline}http://localhost${reset}${bgpurple}${white} ${reset}${br}"
399+
echo -e "${br}${bgpurple}${white} easydock app has been started... visit ${bold}${underline}http://localhost${reset}${bgpurple}${white} ${reset}${br}"
400400
else
401-
echo -e "${br}${bgpurple}${white} easydock has been started... visit ${bold}${underline}http://localhost:${ed_portapp}${reset}${bgpurple}${white} ${reset}${br}"
401+
echo -e "${br}${bgpurple}${white} easydock app has been started... visit ${bold}${underline}http://localhost:${ed_portapp}${reset}${bgpurple}${white} ${reset}${br}"
402402
fi
403403
}
404404

405405
function ed_stop() {
406-
read -r -p "Are you sure to stop easydock containers? (Y/n): " -n 1 -r
406+
read -r -p "Are you sure to stop easydock app? (Y/n): " -n 1 -r
407407
if [[ $REPLY =~ ^[Yy]$ ]]; then
408408
echo -e "${br}${br}${blue}Wait...${reset}${br}"
409409
docker-compose -f ./.easydock/docker-compose.yml --env-file=./.env.easydock stop
@@ -414,7 +414,7 @@ function ed_stop() {
414414
}
415415

416416
function ed_restart() {
417-
read -r -p "Are you sure to restart easydock containers? (Y/n): " -n 1 -r
417+
read -r -p "Are you sure to restart easydock app? (Y/n): " -n 1 -r
418418
if [[ $REPLY =~ ^[Yy]$ ]]; then
419419
echo -e "${br}${br}${blue}Wait...${reset}${br}"
420420
docker-compose -f ./.easydock/docker-compose.yml --env-file=./.env.easydock restart
@@ -427,7 +427,7 @@ function ed_restart() {
427427
function ed_status() {
428428
echo -e "${blue}Wait... ${reset}${br}"
429429
sleep 1s
430-
echo -e "${bgblue}${white} Checking easydock containers status ${reset}${br}"
430+
echo -e "${bgblue}${white} Checking easydock app status ${reset}${br}"
431431
docker-compose -f ./.easydock/docker-compose.yml --env-file=./.env.easydock ps
432432
}
433433

@@ -555,10 +555,10 @@ function ed_bootstrap() {
555555
ed_appsid=$(grep APP_SID .env.easydock | cut -d '=' -f2)
556556
ed_appsrc=$(grep APP_DIR .env.easydock | cut -d '=' -f2)
557557
ed_phpver=$(grep PHP_V .env.easydock | cut -d '=' -f2)
558-
ed_dbver=$(grep DB_VERS .env.easydock | cut -d '=' -f2)
558+
#ed_dbver=$(grep DB_VERS .env.easydock | cut -d '=' -f2)
559559
ed_dbname=$(grep DB_NAME .env.easydock | cut -d '=' -f2)
560560
ed_dbpass=$(grep DB_PASS .env.easydock | cut -d '=' -f2)
561-
ed_nginx=$(grep NGINX_MODE .env.easydock | cut -d '=' -f2)
561+
#ed_nginx=$(grep NGINX_MODE .env.easydock | cut -d '=' -f2)
562562

563563
# Execute CLI command.
564564
ed_cli_menu "$@"

0 commit comments

Comments
 (0)