Skip to content

Commit c491ef0

Browse files
authored
Merge pull request #7 from joglomedia/linux
v1.0.3
2 parents 09de13d + 8db0c48 commit c491ef0

File tree

4 files changed

+34
-21
lines changed

4 files changed

+34
-21
lines changed

config/.env.easydock

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,28 @@ APP_PORT=8008
2323
PHP_VERSION=8.0
2424

2525
# MYSQL DB NAME
26-
DB_NAME=dockerdb
26+
DB_NAME=easydockdb
2727

28-
# MYSQL ROOTPASSWORD
28+
# MYSQL USER
29+
DB_USER=easydock
30+
31+
# MYSQL USER PASSWORD
2932
DB_PASS=secret
3033

34+
# MYSQL ROOT PASSWORD
35+
DB_ROOT_PASS=rootsecret
36+
3137
# MYSQL DB PORT
3238
DB_PORT=3306
3339

3440
# REDIS PORT
35-
RDS_PORT=6379
41+
REDIS_PORT=6379
42+
43+
# REDIS PASS
44+
REDIS_PASS=null
3645

3746
# PHPMYADMIN PORT
3847
PMA_PORT=8080
3948

4049
# MAILHOG PORT
41-
MH_PORT=8081
50+
MH_PORT=8025

src/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ RUN apk update && apk upgrade \
6565
# Install composer
6666
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
6767
# Install node & npm (not yet required for php application)
68-
#&& apk add --update nodejs npm \
68+
&& apk add --no-cache nodejs npm yarn \
6969
# Add user
7070
&& set -eux; \
7171
addgroup -g 1000 -S www; \

src/docker-compose.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ services:
2525
image: nginx:alpine
2626
container_name: ${APP_SID}-nginx
2727
restart: always
28-
tty: true
2928
ports:
3029
- ${APP_PORT}:80
3130
volumes:
@@ -38,25 +37,30 @@ services:
3837
image: yobasystems/alpine-mariadb:latest
3938
container_name: ${APP_SID}-mysql
4039
restart: always
41-
tty: true
42-
ports:
43-
- ${DB_PORT}:3306
4440
environment:
4541
MYSQL_DATABASE: ${DB_NAME}
46-
MYSQL_ROOT_PASSWORD: ${DB_PASS}
42+
MYSQL_USER: ${DB_USER}
43+
MYSQL_PASSWORD: ${DB_PASS}
44+
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS}
45+
expose:
46+
- 3306
47+
ports:
48+
- ${DB_PORT}:3306
4749
command: ['--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci','--default-authentication-plugin=mysql_native_password']
4850
volumes:
4951
- ${APP_DIR}/.easydock/data:/var/lib/mysql/
5052

5153
# Redis
5254
redis:
53-
image: redis:latest
55+
image: redis:alpine
5456
container_name: ${APP_SID}-redis
5557
restart: always
58+
environment:
59+
REDIS_PASSWORD: ${REDIS_PASS}
5660
expose:
5761
- 6379
5862
ports:
59-
- ${RDS_PORT}:6379
63+
- ${REDIS_PORT}:6379
6064

6165
# PHPMyAdmin
6266
#phpmyadmin:
@@ -76,7 +80,7 @@ services:
7680
restart: always
7781
environment:
7882
ADMINER_DEFAULT_SERVER: mysql
79-
MYSQL_ROOT_PASSWORD: ${DB_PASS}
83+
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS}
8084
ports:
8185
- ${PMA_PORT}:8080
8286

src/easydock

Lines changed: 8 additions & 8 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.1 |
11-
# | Last Update : 26/03/2021 |
10+
# | Version : 1.0.3 |
11+
# | Last Update : 14/04/2021 |
1212
# +-------------------------------------------------------------------------+
1313
# | EasyDock-Linux Copyright (c) 2021 MasEDI.Net |
1414
# | EasyDock's Logo & Name Copyright (c) Andrea Pollastri |
@@ -34,7 +34,7 @@ ED_USER=${USER:-$(id -u -n)}
3434
ED_CMD="bash easydock"
3535

3636
# Sudo required commands.
37-
SUDO_CMDS="import reset"
37+
SUDO_CMDS="import remove reset"
3838

3939
# EasyDock CLI source directory.
4040
SOURCE="${BASH_SOURCE[0]}"
@@ -214,7 +214,7 @@ function ed_notfound() {
214214
}
215215

216216
function ed_isthisportfree() {
217-
port="$1"
217+
port="${1}"
218218
check=$(lsof -i "tcp:${port}")
219219
if [ -z "$check" ]; then
220220
return 0
@@ -224,18 +224,18 @@ function ed_isthisportfree() {
224224
}
225225

226226
function ed_unavailableport() {
227-
port=$1
227+
port="${1}"
228228
echo -e "${bgwhite}${red}${bold} >>> ERROR! ${reset} Port: ${bgred}${white}${bold} ${port} ${reset} is used. Try another port. ${reset}${br}"
229229
exit
230230
}
231231

232232
function ed_availableport() {
233-
port=$1
233+
port="${1}"
234234
echo "${green}${port} is available!${reset}"
235235
}
236236

237237
function ed_checkingport() {
238-
port=$1
238+
port="${1}"
239239
echo -e "${br}${blue}Checking port ${port}...${reset}"
240240
}
241241

@@ -558,9 +558,9 @@ function ed_bootstrap() {
558558

559559
ed_portapp=$(grep APP_PORT .env.easydock | cut -d '=' -f2)
560560
ed_portdb=$(grep DB_PORT .env.easydock | cut -d '=' -f2)
561+
ed_portrds=$(grep REDIS_PORT .env.easydock | cut -d '=' -f2)
561562
ed_portpma=$(grep PMA_PORT .env.easydock | cut -d '=' -f2)
562563
ed_portmh=$(grep MH_PORT .env.easydock | cut -d '=' -f2)
563-
ed_portrds=$(grep RDS_PORT .env.easydock | cut -d '=' -f2)
564564
ed_appsid=$(grep APP_SID .env.easydock | cut -d '=' -f2)
565565
ed_appsrc=$(grep APP_DIR .env.easydock | cut -d '=' -f2)
566566
ed_phpver=$(grep PHP_V .env.easydock | cut -d '=' -f2)

0 commit comments

Comments
 (0)