Skip to content
Snippets Groups Projects
Verified Commit fac747b7 authored by David Beniamine's avatar David Beniamine
Browse files

Change the way dolibarr sources are managed

parent 993b4486
No related branches found
No related tags found
No related merge requests found
......@@ -13,9 +13,8 @@ mariadb:
dolibarr:
build: ./docker
volumes:
#- "./dolibarr_src/htdocs:/var/www/html:rw" uncomment to use local clone of dolibarr sources
- "./dolibarr_docs:/var/www/documents:rw"
- "./src:/var/www/html/custom:rw"
- "./dolibarr_src/:/var/www/dolibarr:rw"
- "./src:/var/www/custom:rw"
environment:
DOLI_VERSION: ${DOLI_VERSION}
DOLI_DB_HOST: mariadb
......
......@@ -51,12 +51,6 @@ RUN a2enmod proxy_fcgi
#RUN a2enmod calendar
WORKDIR /var/www/
RUN git clone https://github.com/Dolibarr/dolibarr
RUN rm -rf html
RUN ln -s /var/www/dolibarr/htdocs /var/www/html
WORKDIR /var/www/html
RUN chown -R www-data:www-data /var/www/html/
#RUN sudo -u www-data composer global require laravel/installer
#RUN ln -s /var/www/.composer/vendor/bin/laravel /usr/local/bin/laravel
RUN mkdir /var/www/custom
COPY entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]
......@@ -2,7 +2,7 @@
ServerName localhost
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
DocumentRoot /var/www/dolibarr/htdocs
ErrorLog ${APACHE_LOG_DIR}/dolibarr_erro..log
CustomLog ${APACHE_LOG_DIR}/dolibarr_access.log combined
......
#!/bin/bash
if [ -z "$(ls /var/www/dolibarr 2> /dev/null)" ]; then
# Initialize dolibarr sources if empty
git clone https://github.com/Dolibarr/dolibarr
chown -R www-data:www-data /var/www/dolibarr
fi
if [ -z "$(ls /var/www/custom 2> /dev/null)" ]; then
# Initialize custom directory if empty
cp -r /var/www/dolibarr/htdocs/custom/* /var/www/custom
rm -rf /var/www/dolibarr/htdocs/custom
fi
ln -sf /var/www/custom /var/www/dolibarr/htdocs/
cd /var/www/dolibarr
git fetch
git checkout $DOLI_VERSION
php-fpm7.3 -D
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment