forked from Wavyzz/dolibarr
Support Docker install in production environment (#29951)
* Bookcal : more date check * fix phpcs warning * No error if dateStartTimestamp not yet set * Docker for PROD * Update Readme * Fix else if CodeSniffer warning * Update Readme for Docker * Random DB password * Add install.forced.docker.php * Enable dolibarr_main_url_roo writable in forced mode * revert on main_url editable
This commit is contained in:
61
build/docker-dev/Dockerfile
Normal file
61
build/docker-dev/Dockerfile
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
FROM php:8.1-apache-bullseye
|
||||||
|
|
||||||
|
ENV PHP_INI_DATE_TIMEZONE 'UTC'
|
||||||
|
ENV PHP_INI_MEMORY_LIMIT 256M
|
||||||
|
|
||||||
|
RUN apt-get update -y \
|
||||||
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
libfreetype6-dev \
|
||||||
|
libjpeg62-turbo-dev \
|
||||||
|
libjpeg62-turbo \
|
||||||
|
libpng-dev \
|
||||||
|
libpng16-16 \
|
||||||
|
libldap2-dev \
|
||||||
|
libxml2-dev \
|
||||||
|
libzip-dev \
|
||||||
|
zlib1g-dev \
|
||||||
|
libicu-dev \
|
||||||
|
g++ \
|
||||||
|
default-mysql-client \
|
||||||
|
unzip \
|
||||||
|
curl \
|
||||||
|
apt-utils \
|
||||||
|
msmtp \
|
||||||
|
msmtp-mta \
|
||||||
|
mailutils \
|
||||||
|
&& apt-get autoremove -y \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||||
|
&& docker-php-ext-install -j$(nproc) calendar intl mysqli pdo_mysql gd soap zip \
|
||||||
|
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
|
||||||
|
&& docker-php-ext-install -j$(nproc) ldap && \
|
||||||
|
mv ${PHP_INI_DIR}/php.ini-development ${PHP_INI_DIR}/php.ini
|
||||||
|
|
||||||
|
RUN mkdir /var/documents
|
||||||
|
RUN chown www-data:www-data /var/documents
|
||||||
|
|
||||||
|
COPY docker-run.sh /usr/local/bin/
|
||||||
|
RUN chmod +x /usr/local/bin/docker-run.sh
|
||||||
|
|
||||||
|
RUN pecl install xdebug && docker-php-ext-enable xdebug
|
||||||
|
RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20180731/xdebug.so"' >> ${PHP_INI_DIR}/php.ini
|
||||||
|
RUN echo 'xdebug.mode=debug' >> ${PHP_INI_DIR}/php.ini
|
||||||
|
RUN echo 'xdebug.start_with_request=yes' >> ${PHP_INI_DIR}/php.ini
|
||||||
|
RUN echo 'xdebug.client_host=host.docker.internal' >> ${PHP_INI_DIR}/php.ini
|
||||||
|
RUN echo 'xdebug.client_port=9003' >> ${PHP_INI_DIR}/php.ini
|
||||||
|
RUN echo 'xdebug.discover_client_host=true' >> ${PHP_INI_DIR}/php.ini
|
||||||
|
#RUN echo 'xdebug.log="/tmp/xdebug.log"' >> ${PHP_INI_DIR}/php.ini
|
||||||
|
RUN echo 'xdebug.idekey="netbeans-xdebug"' >> ${PHP_INI_DIR}/php.ini
|
||||||
|
|
||||||
|
# set up sendmail config, to use maildev
|
||||||
|
RUN echo "account default" > /etc/msmtprc
|
||||||
|
RUN echo "auth off" >> /etc/msmtprc
|
||||||
|
RUN echo "port 1025" >> /etc/msmtprc
|
||||||
|
RUN echo "host mail" >> /etc/msmtprc
|
||||||
|
RUN echo "from local@localdomain.com" >> /etc/msmtprc
|
||||||
|
RUN echo "domain localhost.localdomain" >> /etc/msmtprc
|
||||||
|
RUN echo "sendmail_path=/usr/bin/msmtp -t" >> /usr/local/etc/php/conf.d/php-sendmail.ini
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
ENTRYPOINT ["docker-run.sh"]
|
||||||
34
build/docker-dev/README.md
Normal file
34
build/docker-dev/README.md
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# How to use it ?
|
||||||
|
|
||||||
|
The docker-compose.yml file is a sample of a config file to use to build and run Dolibarr in the current workspace with Docker.
|
||||||
|
This docker image is intended for development usage.
|
||||||
|
For production usage you should consider other contributor reference like https://hub.docker.com/r/tuxgasy/dolibarr
|
||||||
|
|
||||||
|
Before build/run, define the variable HOST_USER_ID as following:
|
||||||
|
|
||||||
|
export HOST_USER_ID=$(id -u)
|
||||||
|
|
||||||
|
Go in repository build/docker :
|
||||||
|
|
||||||
|
cd build/docker
|
||||||
|
|
||||||
|
And then, you can run :
|
||||||
|
|
||||||
|
docker-compose up
|
||||||
|
|
||||||
|
This will run 4 containers Docker : Dolibarr, MariaDB, PhpMyAdmin and MailDev.
|
||||||
|
|
||||||
|
The URL to go to the Dolibarr is :
|
||||||
|
|
||||||
|
http://0.0.0.0
|
||||||
|
|
||||||
|
The URL to go to PhpMyAdmin is (login/password is root/root) :
|
||||||
|
|
||||||
|
http://0.0.0.0:8080
|
||||||
|
|
||||||
|
In Dolibarr configuration Email let PHP mail function, To see all mail send by Dolibarr go to maildev
|
||||||
|
|
||||||
|
http://0.0.0.0:8081
|
||||||
|
|
||||||
|
Setup the database connection during the installation process, please use mariadb (name of the database container) as database host.
|
||||||
|
Setup documents folder, during the installation process, to /var/documents
|
||||||
62
build/docker-dev/docker-compose.yml
Normal file
62
build/docker-dev/docker-compose.yml
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
version: '3'
|
||||||
|
|
||||||
|
networks:
|
||||||
|
internal-pod:
|
||||||
|
internal: true
|
||||||
|
external-pod:
|
||||||
|
internal: false
|
||||||
|
|
||||||
|
services:
|
||||||
|
mariadb:
|
||||||
|
image: mariadb:latest
|
||||||
|
environment:
|
||||||
|
MYSQL_ROOT_PASSWORD: rootpassfordev
|
||||||
|
MYSQL_DATABASE: dolibarr
|
||||||
|
ports:
|
||||||
|
- "3306:3306"
|
||||||
|
networks:
|
||||||
|
- internal-pod
|
||||||
|
- external-pod
|
||||||
|
|
||||||
|
phpmyadmin:
|
||||||
|
image: phpmyadmin/phpmyadmin
|
||||||
|
environment:
|
||||||
|
PMA_HOST: mariadb
|
||||||
|
depends_on:
|
||||||
|
- mariadb
|
||||||
|
ports:
|
||||||
|
- "8080:80"
|
||||||
|
networks:
|
||||||
|
- internal-pod
|
||||||
|
- external-pod
|
||||||
|
|
||||||
|
web:
|
||||||
|
build: .
|
||||||
|
environment:
|
||||||
|
HOST_USER_ID: $HOST_USER_ID
|
||||||
|
PHP_INI_DATE_TIMEZONE: $PHP_INI_DATE_TIMEZONE
|
||||||
|
PHP_INI_MEMORY_LIMIT: $PHP_INI_MEMORY_LIMIT
|
||||||
|
volumes:
|
||||||
|
- ../../htdocs:/var/www/html/
|
||||||
|
- ../../documents:/var/documents
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
- "9000:9000"
|
||||||
|
depends_on:
|
||||||
|
- mariadb
|
||||||
|
- mail
|
||||||
|
networks:
|
||||||
|
- internal-pod
|
||||||
|
- external-pod
|
||||||
|
extra_hosts:
|
||||||
|
- "localhost.localdomain:127.0.0.1"
|
||||||
|
- "host.docker.internal:host-gateway"
|
||||||
|
|
||||||
|
mail:
|
||||||
|
image: maildev/maildev
|
||||||
|
ports:
|
||||||
|
- "8081:1080"
|
||||||
|
- "25:1025"
|
||||||
|
networks:
|
||||||
|
- internal-pod
|
||||||
|
- external-pod
|
||||||
24
build/docker-dev/docker-run.sh
Executable file
24
build/docker-dev/docker-run.sh
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Script used by the Dockerfile.
|
||||||
|
# See README.md to know how to create a Dolibarr env with docker
|
||||||
|
|
||||||
|
usermod -u "${HOST_USER_ID}" www-data
|
||||||
|
groupmod -g "${HOST_USER_ID}" www-data
|
||||||
|
|
||||||
|
chgrp -hR www-data /var/www/html
|
||||||
|
chmod g+rwx /var/www/html/conf
|
||||||
|
|
||||||
|
if [ ! -d /var/documents ]; then
|
||||||
|
echo "[docker-run] => create volume directory /var/documents ..."
|
||||||
|
mkdir -p /var/documents
|
||||||
|
fi
|
||||||
|
echo "[docker-run] => Set Permission to www-data for /var/documents"
|
||||||
|
chown -R www-data:www-data /var/documents
|
||||||
|
|
||||||
|
echo "[docker-run] => update '${PHP_INI_DIR}/conf.d/dolibarr-php.ini'"
|
||||||
|
cat <<EOF > "${PHP_INI_DIR}/conf.d/dolibarr-php.ini"
|
||||||
|
date.timezone = ${PHP_INI_DATE_TIMEZONE:-UTC}
|
||||||
|
memory_limit = ${PHP_INI_MEMORY_LIMIT:-256M}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
exec apache2-foreground
|
||||||
36
build/docker/.github/workflows/build.yml
vendored
Normal file
36
build/docker/.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
name: build
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * 6'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-docker-images:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: docker/setup-buildx-action@v2
|
||||||
|
- env:
|
||||||
|
DOCKER_BUILD: 1
|
||||||
|
DOCKER_PUSH: 1
|
||||||
|
run: |
|
||||||
|
echo ${{ secrets.DOCKER_HUB_PASSWORD }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
|
||||||
|
./update.sh
|
||||||
|
|
||||||
|
update-readme:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- run: |
|
||||||
|
docker run --rm -t \
|
||||||
|
-v $(pwd):/src \
|
||||||
|
-e DOCKER_USER=${{ secrets.DOCKER_HUB_USERNAME }} \
|
||||||
|
-e DOCKER_PASS=${{ secrets.DOCKER_HUB_PASSWORD }} \
|
||||||
|
-e PUSHRM_PROVIDER=dockerhub \
|
||||||
|
-e PUSHRM_FILE=/src/README.md \
|
||||||
|
-e PUSHRM_SHORT='Docker image for Dolibarr with auto installer on first boot.' \
|
||||||
|
-e PUSHRM_TARGET=docker.io/tuxgasy/dolibarr \
|
||||||
|
-e PUSHRM_DEBUG=1 \
|
||||||
|
chko/docker-pushrm:1
|
||||||
27
build/docker/.github/workflows/test.yml
vendored
Normal file
27
build/docker/.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
name: test
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-update:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- run: |
|
||||||
|
./update.sh
|
||||||
|
git diff --exit-code
|
||||||
|
|
||||||
|
check-build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- env:
|
||||||
|
DOLI_INSTALL_AUTO: 0
|
||||||
|
run: |
|
||||||
|
./update.sh
|
||||||
|
docker build -t tuxgasy/dolibarr:develop images/develop
|
||||||
|
docker run -d -p 127.0.0.1:80:80 --name dolibarr tuxgasy/dolibarr:develop
|
||||||
|
docker ps | grep -q dolibarr
|
||||||
3
build/docker/.gitignore
vendored
Normal file
3
build/docker/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
.idea/
|
||||||
|
.volumes/
|
||||||
|
docker-compose-links/
|
||||||
@@ -1,61 +1,43 @@
|
|||||||
FROM php:8.1-apache-bullseye
|
FROM php:8.2-apache-bookworm
|
||||||
|
|
||||||
|
LABEL maintainer="Yann Le Doaré <services@linuxconsole.org>"
|
||||||
|
|
||||||
ENV PHP_INI_DATE_TIMEZONE 'UTC'
|
ENV PHP_INI_DATE_TIMEZONE 'UTC'
|
||||||
ENV PHP_INI_MEMORY_LIMIT 256M
|
ENV PHP_INI_MEMORY_LIMIT 256M
|
||||||
|
ENV PHP_INI_UPLOAD_MAX_FILESIZE 2M
|
||||||
|
ENV PHP_INI_POST_MAX_SIZE 8M
|
||||||
|
ENV PHP_INI_ALLOW_URL_FOPEN 0
|
||||||
|
|
||||||
RUN apt-get update -y \
|
RUN apt-get update -y \
|
||||||
|
&& apt-get dist-upgrade -y \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
libc-client-dev \
|
||||||
libfreetype6-dev \
|
libfreetype6-dev \
|
||||||
libjpeg62-turbo-dev \
|
libjpeg62-turbo-dev \
|
||||||
libjpeg62-turbo \
|
libkrb5-dev \
|
||||||
libpng-dev \
|
|
||||||
libpng16-16 \
|
|
||||||
libldap2-dev \
|
libldap2-dev \
|
||||||
|
libpng-dev \
|
||||||
|
libpq-dev \
|
||||||
libxml2-dev \
|
libxml2-dev \
|
||||||
libzip-dev \
|
libzip-dev \
|
||||||
zlib1g-dev \
|
|
||||||
libicu-dev \
|
|
||||||
g++ \
|
|
||||||
default-mysql-client \
|
default-mysql-client \
|
||||||
unzip \
|
postgresql-client \
|
||||||
curl \
|
cron \
|
||||||
apt-utils \
|
|
||||||
msmtp \
|
|
||||||
msmtp-mta \
|
|
||||||
mailutils \
|
|
||||||
&& apt-get autoremove -y \
|
&& apt-get autoremove -y \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
|
||||||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||||
&& docker-php-ext-install -j$(nproc) calendar intl mysqli pdo_mysql gd soap zip \
|
&& docker-php-ext-install -j$(nproc) calendar intl mysqli pdo_mysql gd soap zip \
|
||||||
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
|
&& docker-php-ext-configure pgsql -with-pgsql \
|
||||||
&& docker-php-ext-install -j$(nproc) ldap && \
|
&& docker-php-ext-install pdo_pgsql pgsql \
|
||||||
mv ${PHP_INI_DIR}/php.ini-development ${PHP_INI_DIR}/php.ini
|
&& docker-php-ext-configure ldap --with-libdir=lib/$(gcc -dumpmachine)/ \
|
||||||
|
&& docker-php-ext-install -j$(nproc) ldap \
|
||||||
RUN mkdir /var/documents
|
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
|
||||||
RUN chown www-data:www-data /var/documents
|
&& docker-php-ext-install imap \
|
||||||
|
&& mv ${PHP_INI_DIR}/php.ini-production ${PHP_INI_DIR}/php.ini \
|
||||||
COPY docker-run.sh /usr/local/bin/
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
RUN chmod +x /usr/local/bin/docker-run.sh
|
|
||||||
|
|
||||||
RUN pecl install xdebug && docker-php-ext-enable xdebug
|
|
||||||
RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20180731/xdebug.so"' >> ${PHP_INI_DIR}/php.ini
|
|
||||||
RUN echo 'xdebug.mode=debug' >> ${PHP_INI_DIR}/php.ini
|
|
||||||
RUN echo 'xdebug.start_with_request=yes' >> ${PHP_INI_DIR}/php.ini
|
|
||||||
RUN echo 'xdebug.client_host=host.docker.internal' >> ${PHP_INI_DIR}/php.ini
|
|
||||||
RUN echo 'xdebug.client_port=9003' >> ${PHP_INI_DIR}/php.ini
|
|
||||||
RUN echo 'xdebug.discover_client_host=true' >> ${PHP_INI_DIR}/php.ini
|
|
||||||
#RUN echo 'xdebug.log="/tmp/xdebug.log"' >> ${PHP_INI_DIR}/php.ini
|
|
||||||
RUN echo 'xdebug.idekey="netbeans-xdebug"' >> ${PHP_INI_DIR}/php.ini
|
|
||||||
|
|
||||||
# set up sendmail config, to use maildev
|
|
||||||
RUN echo "account default" > /etc/msmtprc
|
|
||||||
RUN echo "auth off" >> /etc/msmtprc
|
|
||||||
RUN echo "port 1025" >> /etc/msmtprc
|
|
||||||
RUN echo "host mail" >> /etc/msmtprc
|
|
||||||
RUN echo "from local@localdomain.com" >> /etc/msmtprc
|
|
||||||
RUN echo "domain localhost.localdomain" >> /etc/msmtprc
|
|
||||||
RUN echo "sendmail_path=/usr/bin/msmtp -t" >> /usr/local/etc/php/conf.d/php-sendmail.ini
|
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
|
COPY docker-run.sh /usr/local/bin/
|
||||||
ENTRYPOINT ["docker-run.sh"]
|
ENTRYPOINT ["docker-run.sh"]
|
||||||
|
|
||||||
|
CMD ["apache2-foreground"]
|
||||||
|
|||||||
@@ -1,34 +1,6 @@
|
|||||||
# How to use it ?
|
# How to use it ?
|
||||||
|
|
||||||
The docker-compose.yml file is a sample of a config file to use to build and run Dolibarr in the current workspace with Docker.
|
|
||||||
This docker image is intended for development usage.
|
|
||||||
For production usage you should consider other contributor reference like https://hub.docker.com/r/tuxgasy/dolibarr
|
|
||||||
|
|
||||||
Before build/run, define the variable HOST_USER_ID as following:
|
|
||||||
|
|
||||||
export HOST_USER_ID=$(id -u)
|
export HOST_USER_ID=$(id -u)
|
||||||
|
export MYSQL_ROOT_PWD=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 13; echo)
|
||||||
|
|
||||||
Go in repository build/docker :
|
docker-compose up -d
|
||||||
|
|
||||||
cd build/docker
|
|
||||||
|
|
||||||
And then, you can run :
|
|
||||||
|
|
||||||
docker-compose up
|
|
||||||
|
|
||||||
This will run 4 containers Docker : Dolibarr, MariaDB, PhpMyAdmin and MailDev.
|
|
||||||
|
|
||||||
The URL to go to the Dolibarr is :
|
|
||||||
|
|
||||||
http://0.0.0.0
|
|
||||||
|
|
||||||
The URL to go to PhpMyAdmin is (login/password is root/root) :
|
|
||||||
|
|
||||||
http://0.0.0.0:8080
|
|
||||||
|
|
||||||
In Dolibarr configuration Email let PHP mail function, To see all mail send by Dolibarr go to maildev
|
|
||||||
|
|
||||||
http://0.0.0.0:8081
|
|
||||||
|
|
||||||
Setup the database connection during the installation process, please use mariadb (name of the database container) as database host.
|
|
||||||
Setup documents folder, during the installation process, to /var/documents
|
|
||||||
|
|||||||
@@ -1,62 +1,38 @@
|
|||||||
version: '3'
|
# This docker-compose.yml file is used to build and test quickly
|
||||||
|
# a specific version of Dolibarr
|
||||||
|
#
|
||||||
|
# Before build, define the variable DOLI_VERSION as following:
|
||||||
|
# $ export DOLI_VERSION=4.0.4
|
||||||
|
# And then, you can run :
|
||||||
|
# $ docker-compose up
|
||||||
|
#
|
||||||
|
# More information about Docker-compose : https://docs.docker.com/compose/
|
||||||
|
|
||||||
networks:
|
version: "3"
|
||||||
internal-pod:
|
|
||||||
internal: true
|
|
||||||
external-pod:
|
|
||||||
internal: false
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
mariadb:
|
mariadb:
|
||||||
|
container_name: dolibarr-mariadb-dev
|
||||||
image: mariadb:latest
|
image: mariadb:latest
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: rootpassfordev
|
MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PWD
|
||||||
MYSQL_DATABASE: dolibarr
|
MYSQL_DATABASE: "dolibarr-prod"
|
||||||
ports:
|
|
||||||
- "3306:3306"
|
|
||||||
networks:
|
|
||||||
- internal-pod
|
|
||||||
- external-pod
|
|
||||||
|
|
||||||
phpmyadmin:
|
|
||||||
image: phpmyadmin/phpmyadmin
|
|
||||||
environment:
|
|
||||||
PMA_HOST: mariadb
|
|
||||||
depends_on:
|
|
||||||
- mariadb
|
|
||||||
ports:
|
|
||||||
- "8080:80"
|
|
||||||
networks:
|
|
||||||
- internal-pod
|
|
||||||
- external-pod
|
|
||||||
|
|
||||||
web:
|
web:
|
||||||
|
container_name: dolibarr-web-dev
|
||||||
build: .
|
build: .
|
||||||
environment:
|
|
||||||
HOST_USER_ID: $HOST_USER_ID
|
|
||||||
PHP_INI_DATE_TIMEZONE: $PHP_INI_DATE_TIMEZONE
|
|
||||||
PHP_INI_MEMORY_LIMIT: $PHP_INI_MEMORY_LIMIT
|
|
||||||
volumes:
|
volumes:
|
||||||
- ../../htdocs:/var/www/html/
|
- ../../htdocs:/var/www/html/
|
||||||
- ../../documents:/var/documents
|
- ../../documents:/var/www/html/documents
|
||||||
ports:
|
|
||||||
- "80:80"
|
|
||||||
- "9000:9000"
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- mariadb
|
- mariadb
|
||||||
- mail
|
environment:
|
||||||
networks:
|
WWW_USER_ID: 1000
|
||||||
- internal-pod
|
WWW_GROUP_ID: 1000
|
||||||
- external-pod
|
DOLI_ROOT_PASSWORD: $MYSQL_ROOT_PWD
|
||||||
extra_hosts:
|
DOLI_DATABASE: "dolibarr-prod"
|
||||||
- "localhost.localdomain:127.0.0.1"
|
DOLI_DB_SERVER: "mariadb"
|
||||||
- "host.docker.internal:host-gateway"
|
|
||||||
|
|
||||||
mail:
|
|
||||||
image: maildev/maildev
|
|
||||||
ports:
|
ports:
|
||||||
- "8081:1080"
|
- "8080:80"
|
||||||
- "25:1025"
|
|
||||||
networks:
|
|
||||||
- internal-pod
|
|
||||||
- external-pod
|
|
||||||
|
|||||||
@@ -21,4 +21,6 @@ date.timezone = ${PHP_INI_DATE_TIMEZONE:-UTC}
|
|||||||
memory_limit = ${PHP_INI_MEMORY_LIMIT:-256M}
|
memory_limit = ${PHP_INI_MEMORY_LIMIT:-256M}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
cp /var/www/html/install/install.forced.docker.php /var/www/html/install/install.forced.php
|
||||||
|
|
||||||
exec apache2-foreground
|
exec apache2-foreground
|
||||||
|
|||||||
74
htdocs/install/install.forced.docker.php
Normal file
74
htdocs/install/install.forced.docker.php
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
<?php
|
||||||
|
/* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
|
* Copyright (C) 2024 Yann Le Doaré <services@linuxconsole.org>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @var boolean $force_install_nophpinfo Hide PHP information */
|
||||||
|
$force_install_nophpinfo = true;
|
||||||
|
|
||||||
|
/** @var int $force_install_noedit 1 = Lock and hide environment variables, 2 = Lock all set variables */
|
||||||
|
$force_install_noedit = 2;
|
||||||
|
|
||||||
|
/** @var string $force_install_message Information message */
|
||||||
|
$force_install_message = 'Welcome to your Dolibarr Docker install';
|
||||||
|
|
||||||
|
/** @var string $force_install_main_data_root Data root absolute path (documents folder) */
|
||||||
|
$force_install_main_data_root = null;
|
||||||
|
|
||||||
|
/** @var boolean $force_install_mainforcehttps Force HTTPS */
|
||||||
|
$force_install_mainforcehttps = true;
|
||||||
|
|
||||||
|
/** @var string $force_install_database Database name */
|
||||||
|
$force_install_database = getenv('DOLI_DATABASE', true) ?: getenv('DOLI_DATABASE');
|
||||||
|
|
||||||
|
/** @var string $force_install_type Database driver (mysql|mysqli|pgsql|mssql|sqlite|sqlite3) */
|
||||||
|
$force_install_type = 'mysqli';
|
||||||
|
|
||||||
|
/** @var string $force_install_dbserver Database server host */
|
||||||
|
$force_install_dbserver = getenv('DOLI_DB_SERVER', true) ?: getenv('DOLI_DB_SERVER');
|
||||||
|
|
||||||
|
/** @var int $force_install_port Database server port */
|
||||||
|
$force_install_port = 3306;
|
||||||
|
|
||||||
|
/** @var string $force_install_prefix Database tables prefix */
|
||||||
|
$force_install_prefix = 'llx_';
|
||||||
|
|
||||||
|
/** @var bool $force_install_createdatabase Force database creation */
|
||||||
|
$force_install_createdatabase = false;
|
||||||
|
|
||||||
|
/** @var string $force_install_databaselogin Database username */
|
||||||
|
$force_install_databaselogin = 'root';
|
||||||
|
|
||||||
|
/** @var string $force_install_databasepass Database password */
|
||||||
|
$force_install_databasepass = getenv('DOLI_ROOT_PASSWORD', true) ?: getenv('DOLI_ROOT_PASSWORD');
|
||||||
|
|
||||||
|
/** @var bool $force_install_createuser Force database user creation */
|
||||||
|
$force_install_createuser = false;
|
||||||
|
|
||||||
|
/** @var string $force_install_databaserootlogin Database root username */
|
||||||
|
$force_install_databaserootlogin = 'root';
|
||||||
|
|
||||||
|
/** @var string $force_install_databaserootpass Database root password */
|
||||||
|
$force_install_databaserootpass = getenv('DOLI_ROOT_PASSWORD', true) ?: getenv('DOLI_ROOT_PASSWORD');
|
||||||
|
|
||||||
|
/** @var string $force_install_dolibarrlogin Dolibarr super-administrator username */
|
||||||
|
$force_install_dolibarrlogin = 'admin';
|
||||||
|
|
||||||
|
/** @var bool $force_install_lockinstall Force install locking */
|
||||||
|
$force_install_lockinstall = true;
|
||||||
|
|
||||||
|
/** @var string $force_install_module Enable module(s) (Comma separated class names list) */
|
||||||
|
$force_install_module = 'modSociete,modFournisseur,modFacture';
|
||||||
Reference in New Issue
Block a user