Update: Dockerfile

This commit is contained in:
Siroco 2023-07-01 16:08:25 +02:00
parent ab236dc7b7
commit 63b4a18849
No known key found for this signature in database
GPG Key ID: 1324098302A514B0
4 changed files with 68 additions and 31 deletions

View File

@ -3,14 +3,16 @@ FROM debian:stable-slim
ARG BRANCH=25.x ARG BRANCH=25.x
ARG UID=1000 ARG UID=1000
ARG GID=1000 ARG GID=1000
ARG PHP_VERSION=7.4 #ARG PHP_VERSION=7.4
ARG PHP_VERSION=
RUN apt update && apt dist-upgrade -y RUN apt update && apt dist-upgrade -y
RUN apt-get -y install lsb-release ca-certificates curl ## Install Older version
RUN curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg #RUN apt-get -y install lsb-release ca-certificates curl
RUN sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' #RUN curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg
RUN apt-get update #RUN sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
#RUN apt-get update
RUN apt install -y \ RUN apt install -y \
tesseract-ocr tesseract-ocr-spa sudo tesseract-ocr tesseract-ocr-spa sudo
@ -29,14 +31,14 @@ RUN apt install -y \
php-dompdf \ php-dompdf \
composer curl composer curl
RUN update-alternatives --install /usr/bin/php php /usr/bin/php${PHP_VERSION} 99 --force #RUN update-alternatives --install /usr/bin/php php /usr/bin/php${PHP_VERSION} 99 --force
RUN ln -s /usr/bin/python3 /usr/bin/python RUN ln -s /usr/bin/python3 /usr/bin/python
RUN apt install -y \ RUN apt install -y \
apache2 apache2-utils libapache2-mod-php${PHP_VERSION} apache2 apache2-utils libapache2-mod-php${PHP_VERSION}
RUN a2enmod rewrite alias authz_user ssl security RUN a2enmod rewrite alias authz_user ssl
RUN addgroup --gid ${GID} tikiwiki RUN addgroup --gid ${GID} tikiwiki

20
conf/local.php Normal file
View File

@ -0,0 +1,20 @@
<?php
$db_tiki='mysql';
$dbversion_tiki='25.2';
$host_tiki='db';
$user_tiki='tiki';
$pass_tiki='wiki';
$dbs_tiki='dockertiki';
$client_charset='utf8';
// If you experience text encoding issues after updating (e.g. apostrophes etc showing up as strange characters)
// $client_charset='latin1';
// $client_charset='utf8';
// See http://tiki.org/ReleaseNotes5.0#Known_Issues and http://doc.tiki.org/Understanding+Encoding for more info
// If your php installation does not not have pdo extension
// $api_tiki = 'adodb';
// Want configurations managed at the system level or restrict some preferences? http://doc.tiki.org/System+Configuration
// $system_configuration_file = 'db/tiki.ini.php';
// $system_configuration_file = '/etc/tiki.ini';
// $system_configuration_identifier = 'example.com';

View File

@ -395,7 +395,7 @@ max_execution_time = 300
; Development Value: 60 (60 seconds) ; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds) ; Production Value: 60 (60 seconds)
; http://php.net/max-input-time ; http://php.net/max-input-time
max_input_time = 600 max_input_time = 300
; Maximum input variable nesting level ; Maximum input variable nesting level
; http://php.net/max-input-nesting-level ; http://php.net/max-input-nesting-level
@ -406,7 +406,7 @@ max_input_time = 600
; Maximum amount of memory a script may consume ; Maximum amount of memory a script may consume
; http://php.net/memory-limit ; http://php.net/memory-limit
memory_limit = 2G memory_limit = 1024M
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ; ; Error handling and logging ;
@ -691,7 +691,7 @@ auto_globals_jit = On
; Its value may be 0 to disable the limit. It is ignored if POST data reading ; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading. ; is disabled through enable_post_data_reading.
; http://php.net/post-max-size ; http://php.net/post-max-size
post_max_size = 8M post_max_size = 8G
; Automatically add files before PHP document. ; Automatically add files before PHP document.
; http://php.net/auto-prepend-file ; http://php.net/auto-prepend-file
@ -843,7 +843,7 @@ file_uploads = On
; Maximum allowed size for uploaded files. ; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize ; http://php.net/upload-max-filesize
upload_max_filesize = 2M upload_max_filesize = 2G
; Maximum number of files that can be uploaded via a single request ; Maximum number of files that can be uploaded via a single request
max_file_uploads = 20 max_file_uploads = 20
@ -1030,7 +1030,7 @@ cli_server.color = On
[Pcre] [Pcre]
; PCRE library backtracking limit. ; PCRE library backtracking limit.
; http://php.net/pcre.backtrack-limit ; http://php.net/pcre.backtrack-limit
pcre.backtrack_limit=1000000 ;pcre.backtrack_limit=100000
; PCRE library recursion limit. ; PCRE library recursion limit.
; Please note that if you set this value to a high number you may consume all ; Please note that if you set this value to a high number you may consume all

View File

@ -1,27 +1,42 @@
version: '3' version: '3'
volumes:
db:
elasticsearch-data:
services: services:
phpmyadmin: elastic:
image: phpmyadmin image: docker.elastic.co/elasticsearch/elasticsearch:8.7.0
restart: always
ports:
- 8080:80
environment:
- PMA_ARBITRARY=1
tikiwiki:
#image: registry.audio-lab.org/tikiwiki:latest
build:
context: .
args:
- BRANCH=25.x
- UID=1000
- GID=1000
ports:
- 443:443
- 80:80
volumes: volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
ports:
- 9200:9200
restart: always
environment:
- xpack.security.enabled=false
- discovery.type=single-node
db:
image: mysql
volumes:
- db:/var/lib/mysql
restart: always
environment:
MYSQL_DATABASE: dockertiki
MYSQL_USER: tiki
MYSQL_PASSWORD: wiki
MYSQL_ROOT_PASSWORD: wiki
#mysql_host: 192.168.122.231
#mysql_host: 172.16.0.240
tikiwiki:
build: .
image: registry.audio-lab.org/tikiwiki:latest
ports:
- 0.0.0.0:443:443
- 0.0.0.0:80:80
volumes:
- ./conf/local.php:/var/www/html/tiki/db/local.php:ro
- ./uploads:/var/www/html/uploads - ./uploads:/var/www/html/uploads
- /tmp:/tmp - /tmp:/tmp
- ./conf/php.ini:/etc/php/7.4/apache2/php.ini:ro
- ./conf/envvars:/etc/apache2/envvars:ro - ./conf/envvars:/etc/apache2/envvars:ro
- ./conf/default-ssl.conf:/etc/apache2/sites-available/000-default.conf:ro - ./conf/default-ssl.conf:/etc/apache2/sites-available/000-default.conf:ro
restart: always restart: always
@ -29,4 +44,4 @@ services:
MYSQL_DATABASE: dockertiki MYSQL_DATABASE: dockertiki
MYSQL_USER: tiki MYSQL_USER: tiki
MYSQL_PASSWORD: wiki MYSQL_PASSWORD: wiki
MYSQL_HOST: 172.16.0.240 MYSQL_HOST: db