diff --git a/DOCUMENTATION/content/documentation/index.md b/DOCUMENTATION/content/documentation/index.md
index 17847a31..c93d173c 100644
--- a/DOCUMENTATION/content/documentation/index.md
+++ b/DOCUMENTATION/content/documentation/index.md
@@ -1728,6 +1728,31 @@ To install FFMPEG in the Workspace container
3 - Re-build the container `docker-compose build workspace`
+4 - If you use the `php-worker` container too, please follow the same steps above especially if you have conversions that have been queued.
+
+**PS** Don't forget to install the binary in the `php-fpm` container too by applying the same steps above to its container, otherwise the you'll get an error when running the `php-ffmpeg` binary.
+
+
+
+
+
+
+
+
+## Install GNU Parallel
+
+GNU Parallel is a command line tool to run multiple processes in parallel.
+
+(see https://www.gnu.org/software/parallel/parallel_tutorial.html)
+
+To install GNU Parallel in the Workspace container
+
+1 - Open the `.env` file
+
+2 - Search for the `WORKSPACE_INSTALL_GNU_PARALLEL` argument under the Workspace Container and set it to `true`
+
+3 - Re-build the container `docker-compose build workspace`
+
diff --git a/aerospike/Dockerfile b/aerospike/Dockerfile
index a85bc20c..abf0e371 100644
--- a/aerospike/Dockerfile
+++ b/aerospike/Dockerfile
@@ -1,7 +1,3 @@
FROM aerospike:latest
LABEL maintainer="Luciano Jr "
-
-RUN rm /etc/aerospike/aerospike.conf
-
-COPY aerospike.conf /etc/aerospike/aerospike.conf
diff --git a/aerospike/aerospike.conf b/aerospike/aerospike.conf
deleted file mode 100644
index 5e577759..00000000
--- a/aerospike/aerospike.conf
+++ /dev/null
@@ -1,77 +0,0 @@
-# Aerospike database configuration file.
-
-# This stanza must come first.
-service {
- user root
- group root
- paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1.
- pidfile /var/run/aerospike/asd.pid
- service-threads 4
- transaction-queues 4
- transaction-threads-per-queue 4
- proto-fd-max 15000
-}
-
-logging {
-
- # Log file must be an absolute path.
- file /var/log/aerospike/aerospike.log {
- context any info
- }
-
- # Send log messages to stdout
- console {
- context any critical
- }
-}
-
-network {
- service {
- address any
- port 3000
-
- # Uncomment the following to set the `access-address` parameter to the
- # IP address of the Docker host. This will the allow the server to correctly
- # publish the address which applications and other nodes in the cluster to
- # use when addressing this node.
- # access-address
- }
-
- heartbeat {
-
- # mesh is used for environments that do not support multicast
- mode mesh
- port 3002
-
- # use asinfo -v 'tip:host=;port=3002' to inform cluster of
- # other mesh nodes
- mesh-port 3002
-
- interval 150
- timeout 10
- }
-
- fabric {
- port 3001
- }
-
- info {
- port 3003
- }
-}
-
-namespace test {
- replication-factor 2
- memory-size 1G
- default-ttl 5d # 5 days, use 0 to never expire/evict.
-
- # storage-engine memory
-
- # To use file storage backing, comment out the line above and use the
- # following lines instead.
- storage-engine device {
- file /opt/aerospike/data/test.dat
- filesize 4G
- data-in-memory true # Store data in memory in addition to file.
- }
-}
diff --git a/docker-compose.yml b/docker-compose.yml
index 8494a85c..52f0cf31 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -41,6 +41,8 @@ volumes:
driver: ${VOLUMES_DRIVER}
mosquitto:
driver: ${VOLUMES_DRIVER}
+ sonarqube:
+ driver: ${VOLUMES_DRIVER}
services:
@@ -110,6 +112,7 @@ services:
- BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN}
- INSTALL_POWERLINE=${WORKSPACE_INSTALL_POWERLINE}
- INSTALL_FFMPEG=${WORKSPACE_INSTALL_FFMPEG}
+ - INSTALL_GNU_PARALLEL=${WORKSPACE_INSTALL_GNU_PARALLEL}
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
extra_hosts:
@@ -153,6 +156,7 @@ services:
- INSTALL_MYSQLI=${PHP_FPM_INSTALL_MYSQLI}
- INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL}
- INSTALL_PG_CLIENT=${PHP_FPM_INSTALL_PG_CLIENT}
+ - INSTALL_POSTGIS=${PHP_FPM_INSTALL_POSTGIS}
- INSTALL_INTL=${PHP_FPM_INSTALL_INTL}
- INSTALL_GHOSTSCRIPT=${PHP_FPM_INSTALL_GHOSTSCRIPT}
- INSTALL_LDAP=${PHP_FPM_INSTALL_LDAP}
@@ -165,9 +169,11 @@ services:
- INSTALL_IONCUBE=${PHP_FPM_INSTALL_IONCUBE}
- INSTALL_APCU=${PHP_FPM_INSTALL_APCU}
- INSTALL_YAML=${PHP_FPM_INSTALL_YAML}
+ - INSTALL_RDKAFKA=${PHP_FPM_INSTALL_RDKAFKA}
- INSTALL_ADDITIONAL_LOCALES=${PHP_FPM_INSTALL_ADDITIONAL_LOCALES}
- INSTALL_MYSQL_CLIENT=${PHP_FPM_INSTALL_MYSQL_CLIENT}
- ADDITIONAL_LOCALES=${PHP_FPM_ADDITIONAL_LOCALES}
+ - INSTALL_FFMPEG=${PHP_FPM_FFMPEG}
volumes:
- ./php-fpm/php${PHP_VERSION}.ini:/usr/local/etc/php/php.ini
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
@@ -202,6 +208,7 @@ services:
- INSTALL_AMQP=${PHP_WORKER_INSTALL_AMQP}
- INSTALL_GHOSTSCRIPT=${PHP_WORKER_INSTALL_GHOSTSCRIPT}
- INSTALL_SWOOLE=${PHP_WORKER_INSTALL_SWOOLE}
+ - INSTALL_FFMPEG=${PHP_WORKER_INSTALL_FFMPEG}
- PUID=${PHP_WORKER_PUID}
- PGID=${PHP_WORKER_PGID}
volumes:
@@ -403,6 +410,10 @@ services:
- JUPYTERHUB_POSTGRES_USER=${JUPYTERHUB_POSTGRES_USER}
- JUPYTERHUB_POSTGRES_PASSWORD=${JUPYTERHUB_POSTGRES_PASSWORD}
- JUPYTERHUB_POSTGRES_DB=${JUPYTERHUB_POSTGRES_DB}
+ - SONARQUBE_POSTGRES_INIT=${SONARQUBE_POSTGRES_INIT}
+ - SONARQUBE_POSTGRES_DB=${SONARQUBE_POSTGRES_DB}
+ - SONARQUBE_POSTGRES_USER=${SONARQUBE_POSTGRES_USER}
+ - SONARQUBE_POSTGRES_PASSWORD=${SONARQUBE_POSTGRES_PASSWORD}
networks:
- backend
@@ -493,6 +504,10 @@ services:
- "${AEROSPIKE_FABRIC_PORT}:3001"
- "${AEROSPIKE_HEARTBEAT_PORT}:3002"
- "${AEROSPIKE_INFO_PORT}:3003"
+ environment:
+ - STORAGE_GB=${AEROSPIKE_STORAGE_GB}
+ - MEM_GB=${AEROSPIKE_MEM_GB}
+ - NAMESPACE=${AEROSPIKE_NAMESPACE}
networks:
- backend
@@ -1421,3 +1436,26 @@ services:
- "${MANTICORE_HTTP_PORT}:9308"
networks:
- backend
+
+### SONARQUBE ################################################
+ sonarqube:
+ build:
+ context: ./sonarqube
+ hostname: "${SONARQUBE_HOSTNAME}"
+ volumes:
+ - ${DATA_PATH_HOST}/sonarqube/conf:/opt/sonarqube/conf
+ - ${DATA_PATH_HOST}/sonarqube/data:/opt/sonarqube/data
+ - ${DATA_PATH_HOST}/sonarqube/logs:/opt/sonarqube/logs
+ - ${DATA_PATH_HOST}/sonarqube/extensions:/opt/sonarqube/extensions
+ - ${DATA_PATH_HOST}/sonarqube/plugins:/opt/sonarqube/lib/bundled-plugins
+ ports:
+ - ${SONARQUBE_PORT}:9000
+ depends_on:
+ - postgres
+ environment:
+ - sonar.jdbc.username=${SONARQUBE_POSTGRES_USER}
+ - sonar.jdbc.password=${SONARQUBE_POSTGRES_PASSWORD}
+ - sonar.jdbc.url=jdbc:postgresql://${SONARQUBE_POSTGRES_HOST}:5432/${SONARQUBE_POSTGRES_DB}
+ networks:
+ - backend
+ - frontend
diff --git a/env-example b/env-example
index a39d8e70..d7bbc988 100644
--- a/env-example
+++ b/env-example
@@ -140,6 +140,7 @@ WORKSPACE_CHROME_DRIVER_VERSION=2.42
WORKSPACE_TIMEZONE=UTC
WORKSPACE_SSH_PORT=2222
WORKSPACE_INSTALL_FFMPEG=false
+WORKSPACE_INSTALL_GNU_PARALLEL=false
### PHP_FPM ###############################################
@@ -169,15 +170,18 @@ PHP_FPM_INSTALL_LDAP=false
PHP_FPM_INSTALL_PHALCON=false
PHP_FPM_INSTALL_SWOOLE=false
PHP_FPM_INSTALL_PG_CLIENT=false
+PHP_FPM_INSTALL_POSTGIS=false
PHP_FPM_INSTALL_PCNTL=false
PHP_FPM_INSTALL_CALENDAR=false
PHP_FPM_INSTALL_FAKETIME=false
PHP_FPM_INSTALL_IONCUBE=false
+PHP_FPM_INSTALL_RDKAFKA=false
PHP_FPM_FAKETIME=-0
PHP_FPM_INSTALL_APCU=false
PHP_FPM_INSTALL_YAML=false
PHP_FPM_INSTALL_ADDITIONAL_LOCALES=false
PHP_FPM_INSTALL_MYSQL_CLIENT=false
+PHP_FPM_FFMPEG=false
PHP_FPM_ADDITIONAL_LOCALES="es_ES.UTF-8 fr_FR.UTF-8"
### PHP_WORKER ############################################
@@ -191,6 +195,7 @@ PHP_WORKER_INSTALL_MYSQL_CLIENT=false
PHP_WORKER_INSTALL_AMQP=false
PHP_WORKER_INSTALL_GHOSTSCRIPT=false
PHP_WORKER_INSTALL_SWOOLE=false
+PHP_WORKER_INSTALL_FFMPEG=false
PHP_WORKER_PUID=1000
PHP_WORKER_PGID=1000
@@ -379,6 +384,9 @@ AEROSPIKE_SERVICE_PORT=3000
AEROSPIKE_FABRIC_PORT=3001
AEROSPIKE_HEARTBEAT_PORT=3002
AEROSPIKE_INFO_PORT=3003
+AEROSPIKE_STORAGE_GB=1
+AEROSPIKE_MEM_GB=1
+AEROSPIKE_NAMESPACE=test
### RETHINKDB #############################################
@@ -676,3 +684,19 @@ MANTICORE_HTTP_PORT=9308
PGADMIN_PORT=5050
PGADMIN_DEFAULT_EMAIL=pgadmin4@pgadmin.org
PGADMIN_DEFAULT_PASSWORD=admin
+
+### SONARQUBE ################################################
+## docker-compose up -d sonarqube
+## (If you encounter a database error)
+## docker-compose exec --user=root postgres
+## source docker-entrypoint-initdb.d/init_sonarqube_db.sh
+## (If you encounter logs error)
+## docker-compose run --user=root --rm sonarqube chown sonarqube:sonarqube /opt/sonarqube/logs
+
+SONARQUBE_HOSTNAME=sonar.example.com
+SONARQUBE_PORT=9000
+SONARQUBE_POSTGRES_INIT=true
+SONARQUBE_POSTGRES_HOST=postgres
+SONARQUBE_POSTGRES_DB=sonar
+SONARQUBE_POSTGRES_USER=sonar
+SONARQUBE_POSTGRES_PASSWORD=sonarPass
diff --git a/nginx/ssl/.gitkeep b/nginx/ssl/.gitkeep
deleted file mode 100644
index e69de29b..00000000
diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile
index af3428f4..17a98410 100644
--- a/php-fpm/Dockerfile
+++ b/php-fpm/Dockerfile
@@ -128,13 +128,17 @@ RUN if [ ${INSTALL_PGSQL} = true ]; then \
###########################################################################
ARG INSTALL_PG_CLIENT=false
+ARG INSTALL_POSTGIS=false
RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
# Create folders if not exists (https://github.com/tianon/docker-brew-debian/issues/65)
mkdir -p /usr/share/man/man1 && \
mkdir -p /usr/share/man/man7 && \
# Install the pgsql client
- apt-get install -y postgresql-client \
+ apt-get install -y postgresql-client && \
+ if [ ${INSTALL_POSTGIS} = true ]; then \
+ apt-get install -y postgis; \
+ fi \
;fi
###########################################################################
@@ -598,6 +602,18 @@ RUN if [ ${INSTALL_YAML} = true ]; then \
docker-php-ext-enable yaml \
;fi
+###########################################################################
+# RDKAFKA:
+###########################################################################
+
+ARG INSTALL_RDKAFKA=false
+
+RUN if [ ${INSTALL_RDKAFKA} = true ]; then \
+ apt-get install -y librdkafka-dev && \
+ pecl install rdkafka && \
+ docker-php-ext-enable rdkafka \
+;fi
+
###########################################################################
# Install additional locales:
###########################################################################
@@ -627,6 +643,19 @@ RUN if [ ${INSTALL_MYSQL_CLIENT} = true ]; then \
apt-get -y install mysql-client \
;fi
+###########################################################################
+# FFMPEG:
+###########################################################################
+
+USER root
+
+ARG INSTALL_FFMPEG=false
+
+RUN if [ ${INSTALL_FFMPEG} = true ]; then \
+ apt-get update -yqq && \
+ apt-get -y install ffmpeg \
+;fi
+
###########################################################################
# Check PHP version:
###########################################################################
diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile
index fe9f53be..dd7ed040 100644
--- a/php-worker/Dockerfile
+++ b/php-worker/Dockerfile
@@ -69,6 +69,12 @@ RUN if [ ${INSTALL_MYSQL_CLIENT} = true ]; then \
apk --update add mysql-client \
;fi
+# Install FFMPEG:
+ARG INSTALL_FFMPEG=false
+RUN if [ ${INSTALL_FFMPEG} = true ]; then \
+ apk --update add ffmpeg \
+;fi
+
# Install AMQP:
ARG INSTALL_AMQP=false
diff --git a/postgres/docker-entrypoint-initdb.d/.gitignore b/postgres/docker-entrypoint-initdb.d/.gitignore
index c462039b..0721338b 100644
--- a/postgres/docker-entrypoint-initdb.d/.gitignore
+++ b/postgres/docker-entrypoint-initdb.d/.gitignore
@@ -1,3 +1,4 @@
*.sh
!init_gitlab_db.sh
!init_jupyterhub_db.sh
+!init_sonarqube_db.sh
diff --git a/postgres/docker-entrypoint-initdb.d/init_jupyterhub_db.sh b/postgres/docker-entrypoint-initdb.d/init_jupyterhub_db.sh
index 787fabcf..c3869795 100644
--- a/postgres/docker-entrypoint-initdb.d/init_jupyterhub_db.sh
+++ b/postgres/docker-entrypoint-initdb.d/init_jupyterhub_db.sh
@@ -33,7 +33,7 @@
# EOSQL
#
### default database and user for jupyterhub ##############################################
-if [ $JUPYTERHUB_POSTGRES_INIT == 'true' ]; then
+if [ "$JUPYTERHUB_POSTGRES_INIT" == 'true' ]; then
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
CREATE USER $JUPYTERHUB_POSTGRES_USER WITH PASSWORD '$JUPYTERHUB_POSTGRES_PASSWORD';
CREATE DATABASE $JUPYTERHUB_POSTGRES_DB;
diff --git a/postgres/docker-entrypoint-initdb.d/init_sonarqube_db.sh b/postgres/docker-entrypoint-initdb.d/init_sonarqube_db.sh
new file mode 100644
index 00000000..fea961de
--- /dev/null
+++ b/postgres/docker-entrypoint-initdb.d/init_sonarqube_db.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+#
+# Copy createdb.sh.example to createdb.sh
+# then uncomment then set database name and username to create you need databases
+#
+# example: .env POSTGRES_USER=appuser and need db name is myshop_db
+#
+# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
+# CREATE USER myuser WITH PASSWORD 'mypassword';
+# CREATE DATABASE myshop_db;
+# GRANT ALL PRIVILEGES ON DATABASE myshop_db TO myuser;
+# EOSQL
+#
+# this sh script will auto run when the postgres container starts and the $DATA_PATH_HOST/postgres not found.
+#
+#
+# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
+# CREATE USER db1 WITH PASSWORD 'db1';
+# CREATE DATABASE db1;
+# GRANT ALL PRIVILEGES ON DATABASE db1 TO db1;
+# EOSQL
+#
+# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
+# CREATE USER db2 WITH PASSWORD 'db2';
+# CREATE DATABASE db2;
+# GRANT ALL PRIVILEGES ON DATABASE db2 TO db2;
+# EOSQL
+#
+# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
+# CREATE USER db3 WITH PASSWORD 'db3';
+# CREATE DATABASE db3;
+# GRANT ALL PRIVILEGES ON DATABASE db3 TO db3;
+# EOSQL
+#
+### default database and user for gitlab ##############################################
+if [ "$SONARQUBE_POSTGRES_INIT" == 'true' ]; then
+ psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
+ CREATE USER $SONARQUBE_POSTGRES_USER WITH PASSWORD '$SONARQUBE_POSTGRES_PASSWORD';
+ CREATE DATABASE $SONARQUBE_POSTGRES_DB;
+ GRANT ALL PRIVILEGES ON DATABASE $SONARQUBE_POSTGRES_DB TO $SONARQUBE_POSTGRES_USER;
+ ALTER ROLE $SONARQUBE_POSTGRES_USER CREATEROLE SUPERUSER;
+ EOSQL
+ echo
+fi
diff --git a/sonarqube/Dockerfile b/sonarqube/Dockerfile
new file mode 100644
index 00000000..7b32ead3
--- /dev/null
+++ b/sonarqube/Dockerfile
@@ -0,0 +1,3 @@
+FROM sonarqube:latest
+
+LABEL maintainer="xiagw "
diff --git a/workspace/Dockerfile b/workspace/Dockerfile
index 56a1dd43..7dd79bd2 100644
--- a/workspace/Dockerfile
+++ b/workspace/Dockerfile
@@ -1002,6 +1002,19 @@ RUN if [ ${INSTALL_FFMPEG} = true ]; then \
apt-get -y install ffmpeg \
;fi
+###########################################################################
+# GNU Parallel:
+###########################################################################
+
+USER root
+
+ARG INSTALL_GNU_PARALLEL=false
+
+RUN if [ ${INSTALL_GNU_PARALLEL} = true ]; then \
+ apt-get -y install parallel \
+;fi
+
+
###########################################################################
# Check PHP version:
###########################################################################