Compare commits
3 commits
de01e459f1
...
b35ce6e142
Author | SHA1 | Date | |
---|---|---|---|
b35ce6e142 | |||
fdd09cc808 | |||
44a540febf |
3 changed files with 80 additions and 4 deletions
59
.drone.yml
Normal file
59
.drone.yml
Normal file
|
@ -0,0 +1,59 @@
|
|||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
environment:
|
||||
DOCKER_REPO: glenux/service-dolibarr
|
||||
|
||||
steps:
|
||||
- name: publish:commit_sha
|
||||
image: plugins/docker
|
||||
# pull: never
|
||||
# volumes:
|
||||
# - name: cache
|
||||
# path: /stupid
|
||||
settings:
|
||||
username:
|
||||
from_secret: DOCKERHUB_USERNAME
|
||||
password:
|
||||
from_secret: DOCKERHUB_PASSWORD
|
||||
cache_from: "${DOCKER_REPO}:latest_${DRONE_BRANCH/\\//-}"
|
||||
repo: "${DOCKER_REPO}"
|
||||
tags: "${DRONE_COMMIT_SHA:0:8}"
|
||||
|
||||
- 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: "${DOCKER_REPO}:latest_${DRONE_BRANCH/\\//-}"
|
||||
repo: "${DOCKER_REPO}"
|
||||
tags: "latest_${DRONE_BRANCH/\\//-}"
|
||||
when:
|
||||
branch:
|
||||
- "master"
|
||||
- "develop"
|
||||
- "feature/*"
|
||||
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
username: "${DOCKERHUB_USERNAME}"
|
||||
password: "${DOCKERHUB_PASSWORD}"
|
||||
cache_from: "${DOCKER_REPO}:latest_${DRONE_BRANCH/\\//-}"
|
||||
repo: "${DOCKER_REPO}"
|
||||
tags: latest
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
|
||||
# volumes:
|
||||
# - name: cache
|
||||
# temp: {}
|
||||
#
|
18
Dockerfile
18
Dockerfile
|
@ -13,6 +13,8 @@ RUN apt-get update \
|
|||
libmariadb-dev \
|
||||
libpng-dev \
|
||||
libzip-dev \
|
||||
libc-client-dev \
|
||||
libkrb5-dev \
|
||||
zlib1g-dev \
|
||||
&& apt-get autoremove -y \
|
||||
&& docker-php-ext-install -j$(nproc) iconv \
|
||||
|
@ -22,6 +24,8 @@ RUN apt-get update \
|
|||
&& 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
|
||||
|
||||
ADD php-uploads.ini /usr/local/etc/php/conf.d/glenux-uploads.ini
|
||||
|
@ -31,8 +35,8 @@ 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=15.0.1
|
||||
# ENV DOLIBARR_VERSION=14.0.5
|
||||
ENV DOLIBARR_VERSION=16.0.3
|
||||
# ENV DOLIBARR_VERSION=15.0.1
|
||||
RUN wget -q \
|
||||
-O /tmp/dolibarr-${DOLIBARR_VERSION}.zip \
|
||||
https://github.com/Dolibarr/dolibarr/archive/${DOLIBARR_VERSION}.zip
|
||||
|
@ -42,11 +46,17 @@ RUN unzip -d /usr/src /tmp/dolibarr-${DOLIBARR_VERSION}.zip \
|
|||
&& 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
7
README.md
Normal 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
|
||||
|
Loading…
Add table
Reference in a new issue