diff --git a/DOCUMENTATION/content/documentation/index.md b/DOCUMENTATION/content/documentation/index.md
index 73e5990b..b3e22943 100644
--- a/DOCUMENTATION/content/documentation/index.md
+++ b/DOCUMENTATION/content/documentation/index.md
@@ -353,6 +353,28 @@ Note: If `.php-fpm/xdebug` doesn't execute and gives `Permission Denied` error t
+
+
+## Install ionCube Loader
+
+1 - First install `ionCube Loader` in the Workspace and the PHP-FPM Containers:
+
+a) open the `.env` file
+
+b) search for the `WORKSPACE_INSTALL_IONCUBE` argument under the Workspace Container
+
+c) set it to `true`
+
+d) search for the `PHP_FPM_INSTALL_IONCUBE` argument under the PHP-FPM Container
+
+e) set it to `true`
+
+2 - Re-build the containers `docker-compose build workspace php-fpm`
+
+Always download the latest version of [Loaders for ionCube ](http://www.ioncube.com/loaders.php).
+
+
+
@@ -1499,10 +1521,33 @@ e) set it to `true`
3 - Set it to `true`
4 - Re-build the containers `docker-compose build php-fpm`
+
+
+
+## Install libfaketime in the php-fpm container
+Libfaketime allows you to control the date and time that is returned from the operating system.
+It can be used by specifying a special string in the `PHP_FPM_FAKETIME` variable in the `.env` file.
+For example:
+`PHP_FPM_FAKETIME=-1d`
+will set the clock back 1 day. See (https://github.com/wolfcw/libfaketime) for more information.
+
+1 - Open the `.env` file
+
+2 - Search for the `PHP_FPM_INSTALL_FAKETIME` argument under the PHP-FPM container
+
+3 - Set it to `true`
+
+4 - Search for the `PHP_FPM_FAKETIME` argument under the PHP-FPM container
+
+5 - Set it to the desired string
+
+6 - Re-build the containers `docker-compose build php-fpm`
+
+
diff --git a/DOCUMENTATION/content/getting-started/index.md b/DOCUMENTATION/content/getting-started/index.md
index bca083e6..a067fa30 100644
--- a/DOCUMENTATION/content/getting-started/index.md
+++ b/DOCUMENTATION/content/getting-started/index.md
@@ -81,10 +81,10 @@ We'll need to do step 1 of the [Usage](#Usage) section now to make this happen.
cp env-example .env
```
-At the top, change the `APPLICATION` variable to your project path.
+At the top, change the `APP_CODE_PATH_HOST` variable to your project path.
```
-APPLICATION=../project-z/
+APP_CODE_PATH_HOST=../project-z/
```
Make sure to replace `project-z` with your project folder name.
diff --git a/caddy/Dockerfile b/caddy/Dockerfile
index 5603e3a1..06dc4901 100644
--- a/caddy/Dockerfile
+++ b/caddy/Dockerfile
@@ -6,12 +6,14 @@ ARG plugins="cors"
## ARG plugins="cors cgi cloudflare azure linode"
-
RUN caddyplug install ${plugins}
-
+
+RUN apk add --no-cache inotify-tools \
+ && echo -e "#!/bin/sh\nwhile inotifywait -e modify /etc/caddy; do\n\tpkill caddy\ndone " >> /start.sh \
+ && chmod +x /start.sh
EXPOSE 80 443 2015
WORKDIR /var/www/public
-CMD ["/usr/bin/caddy", "-conf", "/etc/Caddyfile","-agree"]
+CMD ["sh","-c","/start.sh & /usr/bin/caddy -conf /etc/caddy/Caddyfile -agree"]
diff --git a/caddy/Caddyfile b/caddy/caddy/Caddyfile
similarity index 93%
rename from caddy/Caddyfile
rename to caddy/caddy/Caddyfile
index b563fb15..1848d346 100644
--- a/caddy/Caddyfile
+++ b/caddy/caddy/Caddyfile
@@ -44,3 +44,8 @@ laradock2.demo:80 {
#proxy domain.com
#cors
}
+
+laradock3.demo:80 {
+ import authlist.conf
+ root /var/www/public
+}
\ No newline at end of file
diff --git a/caddy/caddy/authlist.conf b/caddy/caddy/authlist.conf
new file mode 100644
index 00000000..651bf55e
--- /dev/null
+++ b/caddy/caddy/authlist.conf
@@ -0,0 +1 @@
+basicauth / laradock laradock
diff --git a/docker-compose.yml b/docker-compose.yml
index 958e8bd0..154824a8 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -52,6 +52,8 @@ services:
- INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
- INSTALL_PHPDBG=${WORKSPACE_INSTALL_PHPDBG}
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
+ - INSTALL_SSH2=${WORKSPACE_INSTALL_SSH2}
+ - INSTALL_GMP=${WORKSPACE_INSTALL_GMP}
- INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP}
- INSTALL_LDAP=${WORKSPACE_INSTALL_LDAP}
- INSTALL_IMAP=${WORKSPACE_INSTALL_IMAP}
@@ -89,6 +91,7 @@ services:
- INSTALL_SWOOLE=${WORKSPACE_INSTALL_SWOOLE}
- INSTALL_LIBPNG=${WORKSPACE_INSTALL_LIBPNG}
- INSTALL_GRAPHVIZ=${WORKSPACE_INSTALL_GRAPHVIZ}
+ - INSTALL_IONCUBE=${WORKSPACE_INSTALL_IONCUBE}
- PUID=${WORKSPACE_PUID}
- PGID=${WORKSPACE_PGID}
- CHROME_DRIVER_VERSION=${WORKSPACE_CHROME_DRIVER_VERSION}
@@ -120,6 +123,7 @@ services:
- INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG}
- INSTALL_PHPDBG=${PHP_FPM_INSTALL_PHPDBG}
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
+ - INSTALL_SSH2=${PHP_FPM_INSTALL_SSH2}
- INSTALL_SOAP=${PHP_FPM_INSTALL_SOAP}
- INSTALL_IMAP=${PHP_FPM_INSTALL_IMAP}
- INSTALL_MONGO=${PHP_FPM_INSTALL_MONGO}
@@ -145,6 +149,8 @@ services:
- INSTALL_IMAGE_OPTIMIZERS=${PHP_FPM_INSTALL_IMAGE_OPTIMIZERS}
- INSTALL_IMAGEMAGICK=${PHP_FPM_INSTALL_IMAGEMAGICK}
- INSTALL_CALENDAR=${PHP_FPM_INSTALL_CALENDAR}
+ - INSTALL_FAKETIME=${PHP_FPM_INSTALL_FAKETIME}
+ - INSTALL_IONCUBE=${PHP_FPM_INSTALL_IONCUBE}
volumes:
- ./php-fpm/php${PHP_VERSION}.ini:/usr/local/etc/php/php.ini
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
@@ -155,6 +161,7 @@ services:
environment:
- PHP_IDE_CONFIG=${PHP_IDE_CONFIG}
- DOCKER_HOST=tcp://docker-in-docker:2375
+ - FAKETIME=${PHP_FPM_FAKETIME}
depends_on:
- workspace
networks:
@@ -469,7 +476,7 @@ services:
build: ./caddy
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
- - ${CADDY_CUSTOM_CADDYFILE}:/etc/Caddyfile
+ - ${CADDY_CONFIG_PATH}:/etc/caddy
- ${CADDY_HOST_LOG_PATH}:/var/log/caddy
- ${DATA_PATH_HOST}:/root/.caddy
ports:
@@ -890,3 +897,59 @@ services:
networks:
- backend
+### IDE-THEIA ################################################
+ ide-theia:
+ build:
+ context: ./ide-theia
+ volumes:
+ - ${APP_CODE_PATH_HOST}:/home/project
+ ports:
+ - "${IDE_THEIA_PORT}:3000"
+ networks:
+ - backend
+
+### IDE-WEBIDE ################################################
+ ide-webide:
+ build:
+ context: ./ide-webide
+ volumes:
+ - ${DATA_PATH_HOST}/ide/webide/ide.db:/root/.coding-ide/ide.db
+ ports:
+ - "${IDE_WEBIDE_PORT}:8080"
+ networks:
+ - backend
+
+### IDE-CODIAD ################################################
+ ide-codiad:
+ build:
+ context: ./ide-codiad
+ environment:
+ - APP_CODE_PATH_CONTAINER=${APP_CODE_PATH_CONTAINER}
+ - TZ=${WORKSPACE_TIMEZONE}
+ - PGID=1000
+ - PUID=1000
+ volumes:
+ - /etc/localtime:/etc/localtime:ro
+ - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
+ - ${DATA_PATH_HOST}/ide/codiad:/config
+ ports:
+ - "${IDE_CODIAD_PORT}:80"
+ networks:
+ - backend
+
+### IDE-ICECODER ################################################
+ ide-icecoder:
+ build:
+ context: ./ide-icecoder
+ environment:
+ - DOCUMENT_ROOT=${APP_CODE_PATH_CONTAINER}
+ - TZ=${WORKSPACE_TIMEZONE}
+ - PGID=1000
+ - PUID=1000
+ volumes:
+ - /etc/localtime:/etc/localtime:ro
+ - ${APP_CODE_PATH_HOST}:/home/laradock/ICEcoder/dev
+ ports:
+ - "${IDE_ICECODER_PORT}:8080"
+ networks:
+ - backend
diff --git a/env-example b/env-example
index 7777d578..fdc06749 100644
--- a/env-example
+++ b/env-example
@@ -88,7 +88,9 @@ WORKSPACE_INSTALL_WORKSPACE_SSH=false
WORKSPACE_INSTALL_SUBVERSION=false
WORKSPACE_INSTALL_XDEBUG=false
WORKSPACE_INSTALL_PHPDBG=false
+WORKSPACE_INSTALL_SSH2=false
WORKSPACE_INSTALL_LDAP=false
+WORKSPACE_INSTALL_GMP=false
WORKSPACE_INSTALL_SOAP=false
WORKSPACE_INSTALL_IMAP=false
WORKSPACE_INSTALL_MONGO=false
@@ -115,6 +117,7 @@ WORKSPACE_INSTALL_PG_CLIENT=false
WORKSPACE_INSTALL_SWOOLE=false
WORKSPACE_INSTALL_LIBPNG=false
WORKSPACE_INSTALL_GRAPHVIZ=false
+WORKSPACE_INSTALL_IONCUBE=false
WORKSPACE_PUID=1000
WORKSPACE_PGID=1000
WORKSPACE_CHROME_DRIVER_VERSION=2.32
@@ -139,6 +142,7 @@ PHP_FPM_INSTALL_IMAP=false
PHP_FPM_INSTALL_MONGO=false
PHP_FPM_INSTALL_AMQP=false
PHP_FPM_INSTALL_MSSQL=false
+PHP_FPM_INSTALL_SSH2=false
PHP_FPM_INSTALL_SOAP=false
PHP_FPM_INSTALL_GMP=false
PHP_FPM_INSTALL_EXIF=false
@@ -150,6 +154,9 @@ PHP_FPM_INSTALL_SWOOLE=false
PHP_FPM_INSTALL_PG_CLIENT=false
PHP_FPM_INSTALL_PCNTL=false
PHP_FPM_INSTALL_CALENDAR=false
+PHP_FPM_INSTALL_FAKETIME=false
+PHP_FPM_INSTALL_IONCUBE=false
+PHP_FPM_FAKETIME=-0
### PHP_WORKER ############################################
@@ -353,7 +360,7 @@ MONGODB_PORT=27017
CADDY_HOST_HTTP_PORT=80
CADDY_HOST_HTTPS_PORT=443
CADDY_HOST_LOG_PATH=./logs/caddy
-CADDY_CUSTOM_CADDYFILE=./caddy/Caddyfile
+CADDY_CONFIG_PATH=./caddy/caddy
### LARAVEL ECHO SERVER ###################################
@@ -410,3 +417,9 @@ MONGO_WEBUI_INSTALL_MONGO=false
METABASE_PORT=3030
METABASE_DB_FILE=metabase.db
METABASE_JAVA_TIMEZONE=US/Pacific
+
+### IDE ###############################################
+IDE_THEIA_PORT=987
+IDE_WEBIDE_PORT=984
+IDE_CODIAD_PORT=985
+IDE_ICECODER_PORT=986
diff --git a/ide-codiad/Dockerfile b/ide-codiad/Dockerfile
new file mode 100644
index 00000000..583e75dc
--- /dev/null
+++ b/ide-codiad/Dockerfile
@@ -0,0 +1,5 @@
+FROM linuxserver/codiad
+
+LABEL maintainer="ahkui "
+
+COPY config.php /defaults/config.php
diff --git a/ide-codiad/config.php b/ide-codiad/config.php
new file mode 100644
index 00000000..acd43941
--- /dev/null
+++ b/ide-codiad/config.php
@@ -0,0 +1,43 @@
+
\ No newline at end of file
diff --git a/ide-icecoder/Dockerfile b/ide-icecoder/Dockerfile
new file mode 100644
index 00000000..a58ec677
--- /dev/null
+++ b/ide-icecoder/Dockerfile
@@ -0,0 +1,21 @@
+FROM php:alpine
+
+LABEL maintainer="ahkui "
+
+ARG PUID=1000
+ENV PUID ${PUID}
+ARG PGID=1000
+ENV PGID ${PGID}
+
+RUN apk add --no-cache git
+
+RUN addgroup -g $PGID -S laradock && \
+ adduser -u $PUID -S laradock -G laradock
+
+USER laradock
+
+RUN cd /home/laradock && git clone https://github.com/mattpass/ICEcoder.git
+
+WORKDIR /home/laradock/ICEcoder
+
+CMD ["php","-S","0.0.0.0:8080"]
diff --git a/ide-theia/Dockerfile b/ide-theia/Dockerfile
new file mode 100644
index 00000000..39f2c1b6
--- /dev/null
+++ b/ide-theia/Dockerfile
@@ -0,0 +1,5 @@
+FROM theiaide/theia
+
+LABEL maintainer="ahkui "
+
+RUN echo 'fs.inotify.max_user_watches=524288' >> /etc/sysctl.conf
\ No newline at end of file
diff --git a/ide-webide/Dockerfile b/ide-webide/Dockerfile
new file mode 100644
index 00000000..257b50a7
--- /dev/null
+++ b/ide-webide/Dockerfile
@@ -0,0 +1,3 @@
+FROM webide/webide
+
+LABEL maintainer="ahkui "
diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile
index 2fb86df8..dd7f0d15 100644
--- a/php-fpm/Dockerfile
+++ b/php-fpm/Dockerfile
@@ -50,6 +50,23 @@ RUN apt-get update -yqq && \
# - INSTALL_ZIP_ARCHIVE=true
#
+###########################################################################
+# SSH2:
+###########################################################################
+
+ARG INSTALL_SSH2=false
+
+RUN if [ ${INSTALL_SSH2} = true ]; then \
+ # Install the ssh2 extension
+ apt-get -y install libssh2-1-dev && \
+ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
+ pecl install -a ssh2-0.13; \
+ else \
+ pecl install -a ssh2-1.1.2; \
+ fi && \
+ docker-php-ext-enable ssh2 \
+;fi
+
###########################################################################
# SOAP:
###########################################################################
@@ -325,6 +342,21 @@ RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
&& docker-php-ext-enable aerospike \
;fi
+###########################################################################
+# IonCube Loader:
+###########################################################################
+
+ARG INSTALL_IONCUBE=false
+
+RUN if [ ${INSTALL_IONCUBE} = true ]; then \
+ # Install the php ioncube loader
+ curl -L -o /tmp/ioncube_loaders_lin_x86-64.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz \
+ && tar zxpf /tmp/ioncube_loaders_lin_x86-64.tar.gz -C /tmp \
+ && mv /tmp/ioncube/ioncube_loader_lin_${LARADOCK_PHP_VERSION}.so $(php -r "echo ini_get('extension_dir');")/ioncube_loader.so \
+ && printf "zend_extension=ioncube_loader.so\n" > $PHP_INI_DIR/conf.d/0ioncube.ini \
+ && rm -rf /tmp/ioncube* \
+;fi
+
###########################################################################
# Opcache:
###########################################################################
@@ -485,6 +517,18 @@ RUN if [ ${INSTALL_CALENDAR} = true ]; then \
docker-php-ext-install calendar \
;fi
+###########################################################################
+# libfaketime:
+###########################################################################
+
+USER root
+
+ARG INSTALL_FAKETIME=false
+
+RUN if [ ${INSTALL_FAKETIME} = true ]; then \
+ apt-get install -y libfaketime \
+;fi
+
###########################################################################
# Check PHP version:
###########################################################################
@@ -509,6 +553,12 @@ RUN apt-get clean && \
RUN usermod -u 1000 www-data
+# Adding the faketime library to the preload file needs to be done last
+# otherwise it will preload it for all commands that follow in this file
+RUN if [ ${INSTALL_FAKETIME} = true ]; then \
+ echo "/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1" > /etc/ld.so.preload \
+;fi
+
WORKDIR /var/www
CMD ["php-fpm"]
diff --git a/php-worker/supervisord.d/.gitignore b/php-worker/supervisord.d/.gitignore
new file mode 100644
index 00000000..fee92170
--- /dev/null
+++ b/php-worker/supervisord.d/.gitignore
@@ -0,0 +1 @@
+*.conf
diff --git a/php-worker/supervisord.d/laravel-worker.conf b/php-worker/supervisord.d/laravel-worker.conf.example
similarity index 89%
rename from php-worker/supervisord.d/laravel-worker.conf
rename to php-worker/supervisord.d/laravel-worker.conf.example
index cce9e923..06156bc5 100644
--- a/php-worker/supervisord.d/laravel-worker.conf
+++ b/php-worker/supervisord.d/laravel-worker.conf.example
@@ -4,4 +4,4 @@ command=php /var/www/artisan queue:work --sleep=3 --tries=3 --daemon
autostart=true
autorestart=true
numprocs=8
-redirect_stderr=true
\ No newline at end of file
+redirect_stderr=true
diff --git a/workspace/Dockerfile b/workspace/Dockerfile
index 52dc1691..0aa8f671 100644
--- a/workspace/Dockerfile
+++ b/workspace/Dockerfile
@@ -174,6 +174,33 @@ RUN if [ ${INSTALL_DRUSH} = true ]; then \
drush core-status \
;fi
+###########################################################################
+# SSH2:
+###########################################################################
+
+USER root
+
+ARG INSTALL_SSH2=false
+
+RUN if [ ${INSTALL_SSH2} = true ]; then \
+ # Install the PHP SSH2 extension
+ apt-get -y install libssh2-1-dev php${LARADOCK_PHP_VERSION}-ssh2 \
+;fi
+
+###########################################################################
+# SOAP:
+###########################################################################
+
+USER root
+
+ARG INSTALL_GMP=false
+ARG PHP_VERSION=${PHP_VERSION}
+
+RUN if [ ${INSTALL_GMP} = true ]; then \
+ # Install the PHP SOAP extension
+ apt-get -y install php${PHP_VERSION}-gmp \
+;fi
+
###########################################################################
# SOAP:
###########################################################################
@@ -371,6 +398,7 @@ RUN if [ ${INSTALL_LIBPNG} = true ]; then \
;fi
###########################################################################
+
# GraphViz extension
###########################################################################
@@ -381,6 +409,20 @@ RUN if [ ${INSTALL_GRAPHVIZ} = true ]; then \
apt-get install -y graphviz \
;fi
+# IonCube Loader
+###########################################################################
+
+ARG INSTALL_IONCUBE=false
+
+RUN if [ ${INSTALL_IONCUBE} = true ]; then \
+ # Install the php ioncube loader
+ curl -L -o /tmp/ioncube_loaders_lin_x86-64.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz \
+ && tar zxpf /tmp/ioncube_loaders_lin_x86-64.tar.gz -C /tmp \
+ && mv /tmp/ioncube/ioncube_loader_lin_${LARADOCK_PHP_VERSION}.so $(php -r "echo ini_get('extension_dir');")/ioncube_loader.so \
+ && echo "zend_extension=ioncube_loader.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/0ioncube.ini \
+ && rm -rf /tmp/ioncube* \
+;fi
+
###########################################################################
# Drupal Console:
###########################################################################
@@ -432,6 +474,7 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
&& if [ ${INSTALL_NPM_VUE_CLI} = true ]; then \
npm install -g @vue/cli \
;fi \
+ && ln -s `npm bin --global` /home/laradock/.node-bin \
;fi
# Wouldn't execute when added to the RUN statement in the above block
@@ -452,7 +495,7 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
;fi
# Add PATH for node
-ENV PATH $PATH:$NVM_DIR/versions/node/v${NODE_VERSION}/bin
+ENV PATH $PATH:/home/laradock/.node-bin
RUN if [ ${NPM_REGISTRY} ]; then \
. ~/.bashrc && npm config set registry ${NPM_REGISTRY} \
@@ -488,6 +531,9 @@ RUN if [ ${INSTALL_YARN} = true ]; then \
echo 'export PATH="$YARN_DIR/bin:$PATH"' >> ~/.bashrc \
;fi
+# Add PATH for YARN
+ENV PATH $PATH:/home/laradock/.yarn/bin
+
###########################################################################
# PHP Aerospike:
###########################################################################