Update: Dockerfile && entrypoint
This commit is contained in:
parent
6b37358611
commit
f48bd298ff
35
Dockerfile
35
Dockerfile
@ -3,6 +3,7 @@ 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
|
||||||
|
|
||||||
RUN apt update && apt dist-upgrade -y
|
RUN apt update && apt dist-upgrade -y
|
||||||
|
|
||||||
@ -12,26 +13,28 @@ RUN sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https:
|
|||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
|
|
||||||
RUN apt install -y \
|
RUN apt install -y \
|
||||||
php7.4-dom php7.4-gd php7.4-curl php7.4-intl php7.4-zip php7.4-bcmath \
|
tesseract-ocr sudo
|
||||||
sqlite3 php7.4-sqlite3 build-essential elinks unzip xlsx2csv psutils \
|
|
||||||
php7.4-memcached php7.4-memcached php7.4-opcache php7.4-intl php7.4-gd \
|
RUN apt install -y r-base r-base-dev r-recommended imagemagick
|
||||||
php7.4-mysql php7.4-ldap php7.4-dom php7.4-zip php7.4-ldap \
|
|
||||||
php7.4-fpm php7.4-mysql php7.4-mbstring php7.4-bz2 \
|
RUN apt remove -y php-cli && apt install -y php${PHP_VERSION}-cli
|
||||||
|
|
||||||
|
RUN apt install -y \
|
||||||
|
php${PHP_VERSION}-dom php${PHP_VERSION}-gd php${PHP_VERSION}-curl php${PHP_VERSION}-intl php${PHP_VERSION}-zip php${PHP_VERSION}-bcmath \
|
||||||
|
sqlite3 php${PHP_VERSION}-sqlite3 build-essential elinks unzip xlsx2csv psutils \
|
||||||
|
php${PHP_VERSION}-memcached php${PHP_VERSION}-memcached php${PHP_VERSION}-opcache php${PHP_VERSION}-intl php${PHP_VERSION}-gd \
|
||||||
|
php${PHP_VERSION}-mysql php${PHP_VERSION}-ldap php${PHP_VERSION}-dom php${PHP_VERSION}-zip php${PHP_VERSION}-ldap \
|
||||||
|
php${PHP_VERSION}-fpm php${PHP_VERSION}-mysql php${PHP_VERSION}-mbstring php${PHP_VERSION}-bz2 \
|
||||||
php-dompdf \
|
php-dompdf \
|
||||||
composer curl
|
composer curl
|
||||||
|
|
||||||
|
RUN update-alternatives --install /usr/bin/php php /usr/bin/php${PHP_VERSION} 99 --force
|
||||||
|
|
||||||
RUN apt install -y \
|
RUN apt install -y \
|
||||||
apache2 apache2-utils libapache2-mod-php7.4
|
apache2 apache2-utils libapache2-mod-php${PHP_VERSION}
|
||||||
|
|
||||||
RUN a2enmod rewrite alias authz_user ssl
|
RUN a2enmod rewrite alias authz_user ssl
|
||||||
|
|
||||||
RUN apt install -y \
|
|
||||||
tesseract-ocr
|
|
||||||
|
|
||||||
ADD start.sh /start.sh
|
|
||||||
|
|
||||||
ADD entrypoint.sh /entrypoint.sh
|
|
||||||
|
|
||||||
RUN addgroup --gid ${GID} tikiwiki
|
RUN addgroup --gid ${GID} tikiwiki
|
||||||
|
|
||||||
RUN adduser \
|
RUN adduser \
|
||||||
@ -52,10 +55,16 @@ USER tikiwiki
|
|||||||
|
|
||||||
RUN git clone -b ${BRANCH} https://gitlab.com/tikiwiki/tiki.git .
|
RUN git clone -b ${BRANCH} https://gitlab.com/tikiwiki/tiki.git .
|
||||||
|
|
||||||
|
RUN bash setup.sh -n composer
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
RUN mkdir -p files/forums && chmod -R 777 files/forums
|
RUN mkdir -p files/forums && chmod -R 777 files/forums
|
||||||
|
|
||||||
|
ADD start.sh /start.sh
|
||||||
|
|
||||||
|
ADD entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
VOLUME ["/uploads"]
|
VOLUME ["/uploads"]
|
||||||
|
|
||||||
ENTRYPOINT [ "/bin/sh", "/entrypoint.sh" ]
|
ENTRYPOINT [ "/bin/sh", "/entrypoint.sh" ]
|
||||||
|
@ -9,7 +9,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- PMA_ARBITRARY=1
|
- PMA_ARBITRARY=1
|
||||||
tikiwiki:
|
tikiwiki:
|
||||||
image: registry.audio-lab.org/tikiwiki:latest
|
#image: registry.audio-lab.org/tikiwiki:latest
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
args:
|
args:
|
||||||
@ -30,23 +30,3 @@ services:
|
|||||||
MYSQL_USER: tiki
|
MYSQL_USER: tiki
|
||||||
MYSQL_PASSWORD: wiki
|
MYSQL_PASSWORD: wiki
|
||||||
MYSQL_HOST: 172.16.0.240
|
MYSQL_HOST: 172.16.0.240
|
||||||
manticore:
|
|
||||||
container_name: manticore
|
|
||||||
image: manticoresearch/manticore
|
|
||||||
environment:
|
|
||||||
- EXTRA=1
|
|
||||||
restart: always
|
|
||||||
ports:
|
|
||||||
- 172.16.0.240:9306:9306
|
|
||||||
- 172.16.0.240:9308:9308
|
|
||||||
ulimits:
|
|
||||||
nproc: 65535
|
|
||||||
nofile:
|
|
||||||
soft: 65535
|
|
||||||
hard: 65535
|
|
||||||
memlock:
|
|
||||||
soft: -1
|
|
||||||
hard: -1
|
|
||||||
volumes:
|
|
||||||
- ./manticore:/var/lib/manticore
|
|
||||||
- /tmp:/tmp
|
|
||||||
|
49
docker-compose.yml.kibana
Normal file
49
docker-compose.yml.kibana
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
phpmyadmin:
|
||||||
|
image: phpmyadmin
|
||||||
|
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:
|
||||||
|
- ./uploads:/var/www/html/uploads
|
||||||
|
- /tmp:/tmp
|
||||||
|
- ./conf/envvars:/etc/apache2/envvars:ro
|
||||||
|
- ./conf/default-ssl.conf:/etc/apache2/sites-available/000-default.conf:ro
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
MYSQL_DATABASE: dockertiki
|
||||||
|
MYSQL_USER: tiki
|
||||||
|
MYSQL_PASSWORD: wiki
|
||||||
|
MYSQL_HOST: 172.16.0.240
|
||||||
|
elasticsearch:
|
||||||
|
container_name: es
|
||||||
|
image: docker.elastic.co/elasticsearch/elasticsearch:8.7.0
|
||||||
|
environment:
|
||||||
|
- xpack.security.enabled=false
|
||||||
|
- "discovery.type=single-node"
|
||||||
|
ports:
|
||||||
|
- 9200:9200
|
||||||
|
kibana:
|
||||||
|
container_name: kb
|
||||||
|
image: docker.elastic.co/kibana/kibana:8.7.0
|
||||||
|
environment:
|
||||||
|
- ELASTICSEARCH_HOSTS=http://es-container:9200
|
||||||
|
depends_on:
|
||||||
|
- elasticsearch
|
||||||
|
ports:
|
||||||
|
- 5601:5601
|
52
docker-compose.yml.manticore
Normal file
52
docker-compose.yml.manticore
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
phpmyadmin:
|
||||||
|
image: phpmyadmin
|
||||||
|
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:
|
||||||
|
- ./uploads:/var/www/html/uploads
|
||||||
|
- /tmp:/tmp
|
||||||
|
- ./conf/envvars:/etc/apache2/envvars:ro
|
||||||
|
- ./conf/default-ssl.conf:/etc/apache2/sites-available/000-default.conf:ro
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
MYSQL_DATABASE: dockertiki
|
||||||
|
MYSQL_USER: tiki
|
||||||
|
MYSQL_PASSWORD: wiki
|
||||||
|
MYSQL_HOST: 172.16.0.240
|
||||||
|
manticore:
|
||||||
|
container_name: manticore
|
||||||
|
image: manticoresearch/manticore
|
||||||
|
environment:
|
||||||
|
- EXTRA=1
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- 172.16.0.240:9306:9306
|
||||||
|
- 172.16.0.240:9308:9308
|
||||||
|
ulimits:
|
||||||
|
nproc: 65535
|
||||||
|
nofile:
|
||||||
|
soft: 65535
|
||||||
|
hard: 65535
|
||||||
|
memlock:
|
||||||
|
soft: -1
|
||||||
|
hard: -1
|
||||||
|
volumes:
|
||||||
|
- ./manticore:/var/lib/manticore
|
||||||
|
- /tmp:/tmp
|
@ -4,33 +4,37 @@ set -e
|
|||||||
|
|
||||||
echo "Starting Tikiwiki"
|
echo "Starting Tikiwiki"
|
||||||
|
|
||||||
bash setup.sh -n composer
|
|
||||||
|
|
||||||
install() {
|
install() {
|
||||||
echo "Install"
|
echo "Install"
|
||||||
echo $MYSQL_HOST $MYSQL_USER $MYSQL_PASSWORD $MYSQL_DATABASE
|
sudo -u tikiwiki php console.php database:configure --host $MYSQL_HOST $MYSQL_USER $MYSQL_PASSWORD $MYSQL_DATABASE
|
||||||
php7.4 console.php database:configure --host $MYSQL_HOST $MYSQL_USER $MYSQL_PASSWORD $MYSQL_DATABASE
|
sudo -u tikiwiki php console.php database:install
|
||||||
php7.4 console.php database:install
|
sudo -u tikiwiki php console.php installer:lock
|
||||||
php7.4 console.php installer:lock
|
install_packages
|
||||||
update
|
update
|
||||||
}
|
}
|
||||||
|
|
||||||
|
install_packages() {
|
||||||
|
sudo -u tikiwiki php console.php package:install TikiManager
|
||||||
|
sudo -u tikiwiki php console.php package:install PDFjsViewer
|
||||||
|
sudo -u tikiwiki php console.php package:install MediaAlchemyst
|
||||||
|
sudo -u tikiwiki php console.php package:install diagram
|
||||||
|
sudo -u tikiwiki php console.php package:install mPDF
|
||||||
|
sudo -u tikiwiki php console.php package:install Lozad
|
||||||
|
sudo -u tikiwiki php console.php package:install FakerPHP
|
||||||
|
sudo -u tikiwiki php console.php package:install Expose
|
||||||
|
sudo -u tikiwiki php console.php package:install CasperJS
|
||||||
|
sudo -u tikiwiki php console.php package:install PhpReadability
|
||||||
|
sudo -u tikiwiki php console.php package:install WebODF
|
||||||
|
sudo -u tikiwiki php console.php package:install TesseractOCR
|
||||||
|
sudo -u tikiwiki php console.php package:install FullCalendarScheduler
|
||||||
|
}
|
||||||
|
|
||||||
update() {
|
update() {
|
||||||
echo "Update"
|
echo "Update"
|
||||||
php7.4 console.php database:update
|
sudo -u tikiwiki php console.php database:update
|
||||||
php7.4 console.php package:install TikiManager
|
sudo -u tikiwiki php console.php package:update
|
||||||
php7.4 console.php package:install PDFjsViewer
|
|
||||||
php7.4 console.php package:install MediaAlchemyst
|
|
||||||
php7.4 console.php package:install diagram
|
|
||||||
php7.4 console.php package:install mPDF
|
|
||||||
php7.4 console.php package:install Lozad
|
|
||||||
php7.4 console.php package:install FakerPHP
|
|
||||||
php7.4 console.php package:install Expose
|
|
||||||
php7.4 console.php package:install CasperJS
|
|
||||||
php7.4 console.php package:update
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[ -s ./db/local.php ] && update || install
|
[ -s ./db/local.php ] && update || install
|
||||||
|
|
||||||
|
|
||||||
exec $@
|
exec $@
|
||||||
|
17
install_packages.sh
Executable file
17
install_packages.sh
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "Install Packages Tikiwiki"
|
||||||
|
|
||||||
|
cd /var/www/html/tiki/
|
||||||
|
|
||||||
|
sudo -u tikiwiki php console.php package:install TikiManager
|
||||||
|
sudo -u tikiwiki php console.php package:install PDFjsViewer
|
||||||
|
sudo -u tikiwiki php console.php package:install MediaAlchemyst
|
||||||
|
sudo -u tikiwiki php console.php package:install diagram
|
||||||
|
sudo -u tikiwiki php console.php package:install mPDF
|
||||||
|
sudo -u tikiwiki php console.php package:install Lozad
|
||||||
|
sudo -u tikiwiki php console.php package:install FakerPHP
|
||||||
|
sudo -u tikiwiki php console.php package:install Expose
|
||||||
|
sudo -u tikiwiki php console.php package:install CasperJS
|
29
server.py
Executable file
29
server.py
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
# Python 3 server example
|
||||||
|
from http.server import BaseHTTPRequestHandler, HTTPServer
|
||||||
|
import time
|
||||||
|
|
||||||
|
hostName = "localhost"
|
||||||
|
serverPort = 80
|
||||||
|
|
||||||
|
class MyServer(BaseHTTPRequestHandler):
|
||||||
|
def do_GET(self):
|
||||||
|
self.send_response(200)
|
||||||
|
self.send_header("Content-type", "text/html")
|
||||||
|
self.end_headers()
|
||||||
|
self.wfile.write(bytes("<html><head><title>Instalando Tikiwiki</title></head>", "utf-8"))
|
||||||
|
self.wfile.write(bytes("<body>", "utf-8"))
|
||||||
|
self.wfile.write(bytes("<p>Estamos instalado y configurando tu Tikiwiki.</p>", "utf-8"))
|
||||||
|
self.wfile.write(bytes("<p>Espera unos segundos.</p>", "utf-8"))
|
||||||
|
self.wfile.write(bytes("</body></html>", "utf-8"))
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
webServer = HTTPServer((hostName, serverPort), MyServer)
|
||||||
|
print("Server started http://%s:%s" % (hostName, serverPort))
|
||||||
|
|
||||||
|
try:
|
||||||
|
webServer.serve_forever()
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
pass
|
||||||
|
|
||||||
|
webServer.server_close()
|
||||||
|
print("Server stopped.")
|
Loading…
Reference in New Issue
Block a user