summaryrefslogtreecommitdiff
path: root/docker/config
diff options
context:
space:
mode:
Diffstat (limited to 'docker/config')
-rw-r--r--docker/config/composer-naked.json10
-rw-r--r--docker/config/composer-redis.json11
-rw-r--r--docker/config/info.md69
-rw-r--r--docker/config/opcache.ini9
-rw-r--r--docker/config/php-ext-xdebug.ini24
-rw-r--r--docker/config/php-overrides.ini3
6 files changed, 126 insertions, 0 deletions
diff --git a/docker/config/composer-naked.json b/docker/config/composer-naked.json
new file mode 100644
index 0000000..895e53d
--- /dev/null
+++ b/docker/config/composer-naked.json
@@ -0,0 +1,10 @@
+{
+ "require": {
+ },
+ "autoload": {
+ "classmap": [
+ "/var/www/core/classes",
+ "/var/www/html/app"
+ ]
+ }
+} \ No newline at end of file
diff --git a/docker/config/composer-redis.json b/docker/config/composer-redis.json
new file mode 100644
index 0000000..cd929ae
--- /dev/null
+++ b/docker/config/composer-redis.json
@@ -0,0 +1,11 @@
+{
+ "require": {
+ "predis/predis": "^2.0"
+ },
+ "autoload": {
+ "classmap": [
+ "/var/www/core/classes",
+ "/var/www/html/app"
+ ]
+ }
+} \ No newline at end of file
diff --git a/docker/config/info.md b/docker/config/info.md
new file mode 100644
index 0000000..3ca1c81
--- /dev/null
+++ b/docker/config/info.md
@@ -0,0 +1,69 @@
+## About cron jobs
+
+(on docker containers)
+
+Dockerfile #1
+
+ RUN apt-get update && apt-get install cron -y
+ RUN crontab /
+ crontab -l | { cat; echo "10 * * * * /usr/local/bin/php /var/www/core/cli/cache-categories.php"; } | crontab -
+ CMD cron
+
+
+
+---
+
+
+Dockerfile #2
+
+ RUN apt-get update && \
+ apt-get -y install tzdata cron
+
+ RUN cp /usr/share/zoneinfo/Europe/Rome /etc/localtime && \
+ echo "Europe/Rome" > /etc/timezone
+
+ #RUN apt-get -y remove tzdata
+ RUN rm -rf /var/cache/apk/*
+
+ # Copy cron file to the cron.d directory
+ COPY cron /etc/cron.d/cron
+
+ # Give execution rights on the cron job
+ RUN chmod 0644 /etc/cron.d/cron
+
+ # Apply cron job
+ RUN crontab /etc/cron.d/cron
+
+ # Create the log file to be able to run tail
+ RUN mkdir -p /var/log/cron
+
+ # Add a command to base-image entrypont scritp
+ RUN sed -i 's/^exec /service cron start\n\nexec /' /usr/local/bin/apache2-foreground
+
+
+---
+
+handle cron status
+
+ service cron status
+ service cron stop
+ service cron start
+
+
+
+---
+
+
+docker folder: organizing configuration files
+
+ docker
+ |-- bin: docker-ettrypoint.sh, optimize.sh
+ |
+ `-- config: composer*.json opcache.ini php-overides.ini cron-jobs
+
+
+---
+
+
+check:
+* http://www.idein.it/joomla/14-docker-php-apache-with-crontab \ No newline at end of file
diff --git a/docker/config/opcache.ini b/docker/config/opcache.ini
new file mode 100644
index 0000000..6eba8b2
--- /dev/null
+++ b/docker/config/opcache.ini
@@ -0,0 +1,9 @@
+[opcache]
+opcache.enable=1
+opcache.revalidate_freq=0
+opcache.validate_timestamps=0
+opcache.max_accelerated_files=10000
+opcache.memory_consumption=192
+opcache.max_wasted_percentage=10
+opcache.interned_strings_buffer=16
+opcache.fast_shutdown=1 \ No newline at end of file
diff --git a/docker/config/php-ext-xdebug.ini b/docker/config/php-ext-xdebug.ini
new file mode 100644
index 0000000..4a6a2ed
--- /dev/null
+++ b/docker/config/php-ext-xdebug.ini
@@ -0,0 +1,24 @@
+; [xdebug]
+
+; uncomment next line to enable xdebug
+zend_extension=xdebug
+
+; modes where xdebug is enabled
+xdebug.mode=develop,debug
+
+; common parametres
+xdebug.start_with_request=yes
+xdebug.client_port=9003
+; xdebug.remote_handler=dbgp
+xdebug.idekey=VSCODE
+xdebug.client_host=host.docker.internal
+xdebug.log=/usr/local/etc/php/xdebug.log
+;error_reporting=E_ALL
+
+
+; Note:
+; Remove the comment ; to enable debugging
+;zend_extension=xdebug
+xdebug.client_host=host.docker.internal
+xdebug.start_with_request=yes
+xdebug.mode=debug \ No newline at end of file
diff --git a/docker/config/php-overrides.ini b/docker/config/php-overrides.ini
new file mode 100644
index 0000000..215db1a
--- /dev/null
+++ b/docker/config/php-overrides.ini
@@ -0,0 +1,3 @@
+upload_max_filesize = 10M
+post_max_size = 14M
+memory_limit = 256M \ No newline at end of file