Compare commits

...

51 commits

Author SHA1 Message Date
Glenn Y. Rolland d1e81d12be Bump version to 18.0.4
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
2024-02-05 15:32:03 +01:00
Glenn Y. Rolland 83bb0658c5 Update Dockerfile
All checks were successful
continuous-integration/drone/push Build is passing
2024-02-05 14:26:55 +00:00
Glenn Y. Rolland 0ad4ab4472 Bump dolibarr version to 17.0.2
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-06 09:54:37 +00:00
Glenn Y. Rolland 4719fe9e62 Bump version again
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-15 11:06:54 +01:00
Glenn Y. Rolland 0632220a79 Unbump version to 16.0.4
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-15 10:52:00 +01:00
Glenn Y. Rolland 71e2ce8db5 Revert to php 7.4
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-15 10:35:14 +01:00
Glenn Y. Rolland 984598ec33 docker: Disable composer execution
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-05 14:55:39 +01:00
Glenn Y. Rolland 45e0948b92 Update 'Dockerfile'
Some checks failed
continuous-integration/drone Build is failing
2023-03-05 12:49:48 +00:00
Glenn Y. Rolland eb6f15efaf feat: Add dockerignore for ci file
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone Build is passing
2023-02-21 13:44:05 +01:00
Glenn Y. Rolland 9998bfe548 ci: Add deploy step
Some checks reported errors
continuous-integration/drone/push Build was killed
2023-02-21 13:41:38 +01:00
Glenn Y. Rolland eec4543953 docker: Bump version
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-14 15:51:00 +01:00
Glenn Y. Rolland f95b7ff10e ci: Distribute env var to avoid bugs
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-16 02:35:29 +01:00
Glenn Y. Rolland ddcac30b89 ci: Do not purge (reuse cache)
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-16 02:17:38 +01:00
Glenn Y. Rolland f10eb465b2 ci: play with yaml references
Some checks reported errors
continuous-integration/drone/push Build was killed
2023-01-16 02:11:50 +01:00
Glenn Y. Rolland 19062e486c ci: try to use pipeline env
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-16 02:01:25 +01:00
Glenn Y. Rolland dcaa4e1a9c ci: Add debugush
Some checks reported errors
continuous-integration/drone/push Build was killed
2023-01-16 01:53:09 +01:00
Glenn Y. Rolland 97b8c096fc ci: Add debug
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-16 01:44:47 +01:00
Glenn Y. Rolland c2aa144483 ci: Add debug
Some checks reported errors
continuous-integration/drone/push Build was killed
2023-01-16 01:42:24 +01:00
Glenn Y. Rolland ccbed63d42 ci: Add debug
Some checks reported errors
continuous-integration/drone/push Build was killed
2023-01-16 01:41:15 +01:00
Glenn Y. Rolland e47e667fc6 ci: Add debug
Some checks reported errors
continuous-integration/drone/push Build was killed
2023-01-16 01:40:47 +01:00
Glenn Y. Rolland ce0a5ba5e8 ci: Add debug 2023-01-16 01:36:17 +01:00
Glenn Y. Rolland 56ff8e2a0c ci: try to fix the repo name
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-16 01:21:07 +01:00
Glenn Y. Rolland e47f9c1e82 fix: make unzip quiet
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-16 01:15:08 +01:00
Glenn Y. Rolland b35ce6e142 ci: Initial import
Some checks failed
continuous-integration/drone Build is failing
2023-01-16 00:58:43 +01:00
Glenn Y. Rolland fdd09cc808 doc: Add readme 2023-01-16 00:58:16 +01:00
Glenn Y. Rolland 44a540febf Fix configuration to prepare for the next version 2022-12-09 15:19:22 +01:00
Glenn Y. Rolland de01e459f1 Revert to PHP 7.4 due to incompatibilities with dependencies 2022-04-13 15:23:29 +02:00
Glenn Y. Rolland 667c98ea3c Update compose.lock if needed 2022-04-13 15:09:06 +02:00
Glenn Y. Rolland 4f51237e2a Bump Dolibarr version to 15.0.1 2022-04-13 14:25:24 +02:00
Glenn Y. Rolland 97a08ec973 Bump PHP base image version to PHP 8.0 2022-04-13 14:25:04 +02:00
Glenn Y. Rolland a12dfd4f52 Bump to 14.0.5 2022-02-28 16:34:55 +01:00
Glenn Y. Rolland 382603d2e3 Bump version to 14.0.1 & re-organize for better caching. 2021-09-09 21:18:14 +02:00
Glenn Y. Rolland b466e8e4b4 CI/CD: fix duplicate argument 2021-07-01 13:03:24 +02:00
Glenn Y. Rolland 6a43b24044 CI/CD: fix duplicate argument 2021-07-01 13:01:50 +02:00
Glenn Y. Rolland 2d65ae1fb7 CI/CD: add alternative version tag 2021-07-01 12:56:28 +02:00
Glenn Y. Rolland 7147f1019d Update .gitlab-ci.yml file 2021-07-01 12:41:06 +02:00
Glenn Y. Rolland b123b2eec7 Update .gitlab-ci.yml file 2021-07-01 10:36:51 +00:00
Glenn Y. Rolland 64060b1588 fix: add missing libzip-dev 2021-04-19 19:42:28 +02:00
Glenn Y. Rolland 180e0e8cd7 fix: remove useless option 2021-04-19 19:31:41 +02:00
Glenn Y. Rolland be3de753c3 fix: change gd build options for PHP 7.4 2021-04-19 19:25:23 +02:00
Glenn Y. Rolland 04430d40ab Bump PHP & Dolibarr version 2021-04-19 19:14:32 +02:00
Glenn Y. Rolland e21f508b8a Merge branch 'master' of github.com:glenux/glenuxnet-service-dolibarr 2021-04-08 00:39:29 +02:00
Glenn Y. Rolland 0f64c6f6d9 Revert php to 7.2 2021-02-01 00:23:30 +01:00
Glenn Y. Rolland 90f573d53f Revert php to 7.3 2021-02-01 00:14:59 +01:00
Glenn Y. Rolland 5c14290480 Bump version to v13 2021-02-01 00:10:41 +01:00
Glenn Y. Rolland e8e3d63e7a Add support for calendar 2020-07-14 19:01:59 +02:00
Glenn Y. Rolland d1999937fd Bump to 12.0.1 2020-07-14 17:08:38 +02:00
Glenn Y. Rolland 9bb279f7dc Bump to 12.0.1 2020-07-14 17:07:22 +02:00
Glenn Y. Rolland 67c324af2c Fix docker-compose.yml 2020-07-14 17:06:43 +02:00
Glenn Y. Rolland 4b6b15cb4a Bump version 2020-05-27 11:42:33 +02:00
Glenn Y. Rolland 4dcb860eec Upgrade config to latest php / dolibarr image 2019-10-12 18:02:05 +02:00
6 changed files with 232 additions and 19 deletions

1
.dockerignore Normal file
View file

@ -0,0 +1 @@
.drone.yml

98
.drone.yml Normal file
View file

@ -0,0 +1,98 @@
---
kind: pipeline
type: docker
name: default
steps:
- name: debug
image: alpine
environment:
commands:
- 'echo "Repository: glenux/service-dolibarr"'
- 'echo "Git commit: ${DRONE_COMMIT_SHA:0:8}"'
- name: publish:commit_sha
image: plugins/docker
# pull: never
# volumes:
# - name: cache
# path: /stupid
environment:
DOCKER_REPO: glenux/service-dolibarr
settings:
username:
from_secret: DOCKERHUB_USERNAME
password:
from_secret: DOCKERHUB_PASSWORD
cache_from: "glenux/service-dolibarr:latest_${DRONE_BRANCH/\\//-}"
repo: glenux/service-dolibarr
tags: "${DRONE_COMMIT_SHA:0:8}"
purge: false
- name: publish:commit_branch
image: plugins/docker
# volumes:
# - name: cache
# path: /stupid
settings:
username:
from_secret: DOCKERHUB_USERNAME
password:
from_secret: DOCKERHUB_PASSWORD
cache_from: "glenux/service-dolibarr:latest_${DRONE_BRANCH/\\//-}"
repo: glenux/service-dolibarr
tags: "latest_${DRONE_BRANCH/\\//-}"
purge: false
when:
branch:
- "master"
- "develop"
- "feature/*"
- name: publish:latest
image: plugins/docker
settings:
username:
from_secret: DOCKERHUB_USERNAME
password:
from_secret: DOCKERHUB_PASSWORD
cache_from: "glenux/service-dolibarr:latest_${DRONE_BRANCH/\\//-}"
repo: glenux/service-dolibarr
tags: latest
purge: false
when:
branch:
- master
- name: deploy:dokku
image: alpine
when:
branch:
- master
environment:
SSH_USER:
from_secret: SSH_USER
SSH_HOST:
from_secret: SSH_HOST
SSH_PRIVATE_KEY:
from_secret: SSH_PRIVATE_KEY
commands:
- echo $SSH_USER
- echo $SSH_HOST
- echo $SSH_PRIVATE_KEY
- apk update && apk add openssh-client
- mkdir -p ~/.ssh && chmod 700 ~/.ssh
- echo "$SSH_PRIVATE_KEY" | base64 -d > ~/.ssh/deploy_key
- chmod 600 ~/.ssh/deploy_key
- |
ssh -o StrictHostKeyChecking=no \
-i ~/.ssh/deploy_key \
"$SSH_USER@$SSH_HOST" \
git:from-image erp \
"glenux/service-dolibarr:${DRONE_COMMIT_SHA:0:8}"
# volumes:
# - name: cache
# temp: {}
#

86
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,86 @@
---
# This file is a template, and might need editing before it works on your
# project. To contribute improvements to CI/CD templates, please follow the
# Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
#
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml
# This is a sample GitLab CI/CD configuration file that should run without any
# modifications. It demonstrates a basic 3 stage CI/CD pipeline. Instead of
# real tests or scripts, it uses echo commands to simulate the pipeline
# execution.
#
# A pipeline is composed of independent jobs that run scripts, grouped into
# stages. Stages run in sequential order, but jobs within stages run in
# parallel.
#
# For more information, see:
# https://docs.gitlab.com/ee/ci/yaml/README.html#stages
# List of stages for jobs, and their order of execution
stages:
- build
- test
- deploy
build-docker-image: # This job runs in the build stage, which runs first.
stage: build
image: docker:latest
services:
- docker:dind
before_script:
- docker login
-u "$CI_REGISTRY_USER"
-p "$CI_REGISTRY_PASSWORD"
$CI_REGISTRY
- export VERSION="$(echo
"${CI_COMMIT_BRANCH}_$(date +%Y%m%dT%H%M%S)_${CI_COMMIT_SHA:0:8}"
|sed 's,/,--,g')"
# Default branch leaves tag empty (= latest tag)
# All other branches are tagged with the escaped branch name (commit ref slug)
script:
- |
if [ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]; then
tag=""
echo "Running on default branch '$CI_DEFAULT_BRANCH': tag = 'latest'"
else
tag=":$CI_COMMIT_REF_SLUG"
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
fi
- docker build
--pull
--file Dockerfile
--tag "$CI_REGISTRY_IMAGE${tag}"
--tag "$CI_REGISTRY_IMAGE:$VERSION"
.
- docker push "$CI_REGISTRY_IMAGE${tag}"
- docker push "$CI_REGISTRY_IMAGE:$VERSION"
# Run this job in a branch where a Dockerfile exists
rules:
- if: $CI_COMMIT_BRANCH
exists:
- Dockerfile
# This job runs in the test stage.
# unit-test-job:
# # It only starts when the job in the build stage completes successfully.
# stage: test
# script:
# - echo "Running unit tests... This will take about 60 seconds."
# - sleep 60
# - echo "Code coverage is 90%"
# lint-test-job: # This job also runs in the test stage.
# stage: test # It can run at the same time as unit-test-job (in parallel).
# script:
# - echo "Linting code... This will take about 10 seconds."
# - sleep 10
# - echo "No lint issues found."
# deploy-job: # This job runs in the deploy stage.
# stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
# script:
# - echo "Deploying application..."
# - echo "Application successfully deployed."

View file

@ -1,42 +1,63 @@
FROM php:7.1-apache
FROM php:8.1-apache-buster
# FROM php:7.4-apache-buster
MAINTAINER Glenn ROLLAND <glenux@glenux.net>
RUN apt-get update \
&& apt-cache search lib mysql dev$ \
&& apt-get install -y \
wget unzip curl \
libfreetype6-dev \
libicu-dev \
libjpeg62-turbo-dev \
libmariadb-dev \
libpng-dev \
libmysql++-dev \
libzip-dev \
libc-client-dev \
libkrb5-dev \
zlib1g-dev \
&& apt-get autoremove \
&& apt-get autoremove -y \
&& docker-php-ext-install -j$(nproc) iconv \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-configure intl \
&& docker-php-ext-install -j$(nproc) intl \
&& docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd \
&& docker-php-ext-install pdo pdo_mysql mysqli \
&& docker-php-ext-install calendar \
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
&& docker-php-ext-install imap \
&& docker-php-ext-install zip
RUN curl -sS https://getcomposer.org/installer \
| php -- --install-dir=/usr/local/bin --filename=composer
RUN wget \
-O /tmp/dolibarr-8.0.4.zip \
https://github.com/Dolibarr/dolibarr/archive/8.0.4.zip
RUN unzip -d /usr/src /tmp/dolibarr-8.0.4.zip \
&& chown -R www-data:www-data /usr/src/dolibarr-8.0.4 \
&& rm -fr /var/www/html \
&& cp -a /usr/src/dolibarr-8.0.4 /var/www/html
ADD php-uploads.ini /usr/local/etc/php/conf.d/glenux-uploads.ini
ADD php-performance.ini /usr/local/etc/php/conf.d/glenux-performance.ini
ADD php-errors.ini /usr/local/etc/php/conf.d/glenux-errors.ini
RUN curl -sS https://getcomposer.org/installer \
| php -- --install-dir=/usr/local/bin --filename=composer
ENV DOLIBARR_VERSION=18.0.4
# ENV DOLIBARR_VERSION=17.0.2
# ENV DOLIBARR_VERSION=16.0.4
RUN wget -q \
-O /tmp/dolibarr-${DOLIBARR_VERSION}.zip \
https://github.com/Dolibarr/dolibarr/archive/${DOLIBARR_VERSION}.zip
RUN unzip -q -d /usr/src /tmp/dolibarr-${DOLIBARR_VERSION}.zip \
&& chown -R www-data:www-data /usr/src/dolibarr-${DOLIBARR_VERSION} \
&& rm -fr /var/www/html \
&& cp -a /usr/src/dolibarr-${DOLIBARR_VERSION} /var/www/html
WORKDIR /var/www/html
# RUN pwd \
# && ls -lh \
# && mv composer.json.disabled composer.json \
# && composer install
RUN sed \
-i 's|/var/www/html|/var/www/html/htdocs|' \
/etc/apache2/sites-enabled/000-default.conf
WORKDIR /var/www/html
CMD composer install && apache2-foreground
CMD apache2-foreground

7
README.md Normal file
View file

@ -0,0 +1,7 @@
Ref: https://wiki.dolibarr.org/index.php?title=Setup_Other
PROJECT_ALLOW_COMMENT_ON_TASK
PROJECT_ALLOW_COMMENT_ON_PROJECT

View file

@ -19,7 +19,7 @@ services:
networks:
- backend
volumes:
- dolibar-config:/var/www/html/conf
- dolibar-config:/var/www/html/htdocs/conf
- dolibar-documents:/var/www/html/documents
adminer: