Skip to content

Commit

Permalink
Merge branch 'develop' into 'main'
Browse files Browse the repository at this point in the history
Add Robert2/Loxya 0.18.1 support

Closes #2

See merge request mlaplanche/docker-robert2!16
  • Loading branch information
LaplancheMaxime committed Mar 29, 2022
2 parents a5b8d2b + e63a83c commit f980aa1
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 13 deletions.
5 changes: 2 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
stages:
- build
- quality_gate
- deploy

dockerfile:deploy:hub:develop:
stage: build
Expand All @@ -28,4 +27,4 @@ dockerfile:deploy:hub:master:
- export DOCKER_PUSH="1"
- bash update.sh
only:
- main
- main
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Robert2 / Loxya on Docker

<div align="center">

<img src="https://gitlab.com/uploads/-/system/project/avatar/34781125/docker-robert2.png" width="100" alt="docker-robert2">
Expand All @@ -8,7 +9,7 @@
[![GitHub Official last release](https://badgen.net/github/release/Robert-2/Robert2/stable?icon=github)](https://github.com/Robert-2/Robert2/releases)
[![GitHub Official last release](https://badgen.net/github/release/LaplancheMaxime/docker-robert2?icon=github)](https://github.com/LaplancheMaxime/docker-robert2)

Dockerfile and compose for Robert2 / Loxya (https://robertmanager.org/)
Dockerfile and compose for Robert2 / Loxya (<https://robertmanager.org/>)

[![Docker hub](https://dockeri.co/image/maximelaplanche/robert2)](https://hub.docker.com/r/maximelaplanche/robert2)

Expand All @@ -17,30 +18,39 @@ Dockerfile and compose for Robert2 / Loxya (https://robertmanager.org/)
</div>

## Supported tags
* **`0.18.0`** `0.18.0-php8-apache-buster` | [Dockerfile](/images/0.18.0-php8-apache-buster/Dockerfile) | [Official release note](https://github.com/Robert-2/Robert2/blob/master/CHANGELOG.md#0180-2022-03-28) | [Official github release](https://github.com/Robert-2/Robert2/releases/tag/0.18.0)

* **`latest`** **`0.18.1`** `0.18.1-php8-apache-buster` | [Dockerfile](/images/0.18.1-php8-apache-buster/Dockerfile) | [Official release note](https://github.com/Robert-2/Robert2/blob/master/CHANGELOG.md#0181-2022-03-29) | [Official github release](https://github.com/Robert-2/Robert2/releases/tag/0.18.1)

* **`0.17.1`** `0.17.1-php8-apache-buster` | [Dockerfile](/images/0.17.1-php8-apache-buster/Dockerfile) | [Official release note](https://github.com/Robert-2/Robert2/blob/master/CHANGELOG.md#0171-2022-01-06) | [Official github release](https://github.com/Robert-2/Robert2/releases/tag/0.17.1)

* **`0.16.2`** `0.16.2-php8-apache-buster` | [Dockerfile](/images/0.16.2-php8-apache-buster/Dockerfile) | [Official release note](https://github.com/Robert-2/Robert2/blob/master/CHANGELOG.md#0161-2021-11-03) | [Official github release](https://github.com/Robert-2/Robert2/releases/tag/0.16.2)

## What is Robert2 / Loxya

Web application to manage equipment rental or loan. Simple, efficient, scalable and open-source.

### Who is it for?

If you are an association, a school or university, a company or even an auto-entrepreneur, and you have equipment to rent or to lend, this software is for you!

It will help you manage your equipment, your services, your clients and beneficiaries, as well as your staff.

### More information
### More information

* [Robert2 repository](https://github.com/Robert-2/Robert2)
* [Robert2 official website](https://robertmanager.org/)
* [Robert2 official documentation](https://robertmanager.org/wiki)

## How to run this image ?

This image is based on the [official PHP repository](https://registry.hub.docker.com/_/php/).

**Important**: This image don't contains database.

Let's use [Docker Compose](https://docs.docker.com/compose/) to integrate it with [MySQL](https://hub.docker.com/_/mysql/).

Create `docker-compose.yml` file as following:

```yaml
---
version: '3.7'
Expand Down Expand Up @@ -76,4 +86,5 @@ networks:
volumes:
robert2_data:
```
Then run all services `docker-compose up -d`. Now, go to http://0.0.0.0 to access to the new Robert2/Loxya installation.
Then run all services `docker-compose up -d`. Now, go to <http://0.0.0.0> to access to the new Robert2/Loxya installation.
8 changes: 6 additions & 2 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
---
# We assume to have a traefik network on our
# development machine to expose robert2.treafik.me in SSL
# More information here: https://zestedesavoir.com/billets/3355/traefik-v2-https-ssl-en-localhost/
# You can up this stack from the ./run-dev.sh file
version: '3.7'
services:
app:
image: robert2
build:
context: .
dockerfile: ./images/${ROBERT2_VERSION}-php8/Dockerfile
dockerfile: ./images/${ROBERT2_VERSION}-php8-apache-buster/Dockerfile
environment:
ROBERT2_VERSION: 0.17.1
ROBERT2_VERSION: 0.18.1
labels:
traefik.enable: true
traefik.http.routers.robert2.tls: true
Expand Down
48 changes: 48 additions & 0 deletions images/0.18.1-php8-apache-buster/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
FROM php:8-apache-buster

LABEL maintainer="Maxime LAPLANCHE <maxime.laplanche@outlook.com>"

ENV ROBERT2_VERSION 0.18.1

ENV PHP_INI_DATE_TIMEZONE 'UTC'
ENV PHP_INI_MEMORY_LIMIT 256M

RUN apt-get update -y \
&& apt-get dist-upgrade -y \
&& apt-get install -y --no-install-recommends \
libc-client-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
libkrb5-dev \
libldap2-dev \
libpng-dev \
libpq-dev \
libxml2-dev \
libzip-dev \
default-mysql-client \
postgresql-client \
unzip \
&& apt-get autoremove -y \
&& 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 pgsql -with-pgsql \
&& docker-php-ext-install pdo_pgsql pgsql \
&& mv ${PHP_INI_DIR}/php.ini-production ${PHP_INI_DIR}/php.ini \
&& a2enmod rewrite

RUN curl -fLSso Robert2-${ROBERT2_VERSION}.zip https://github.com/Robert-2/Robert2/releases/download/${ROBERT2_VERSION}/Robert2-${ROBERT2_VERSION}.zip &&\
unzip Robert2-${ROBERT2_VERSION}.zip -d /tmp && \
cp -r /tmp/Robert2-${ROBERT2_VERSION}/. /var/www/html/ && \
rm -rf /tmp/* && \
rm -rf Robert2-${ROBERT2_VERSION}.zip && \
chown -R www-data:www-data /var/www && \
chmod -R 777 /var/www/html/data && \
chmod -R 777 /var/www/html/src/var && \
chmod -R 777 /var/www/html/src/install && \
chmod -R 777 /var/www/html/src/App/Config

RUN rm -rf /var/lib/apt/lists/*

EXPOSE 80

CMD ["apache2-foreground"]
4 changes: 2 additions & 2 deletions run-dev.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

source "${BASE_DIR}/versions.sh"
source "${BASE_DIR}versions.sh"

export ROBERT2_VERSION=0.17.1
export ROBERT2_VERSION=0.18.1

docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d --build
4 changes: 2 additions & 2 deletions versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

set -e

ROBERT2_VERSIONS=( "0.16.2" "0.17.1" "0.18.0" )
ROBERT2_LATEST_TAG="0.18.0"
ROBERT2_VERSIONS=( "0.16.2" "0.17.1" "0.18.1" )
ROBERT2_LATEST_TAG="0.18.1"

0 comments on commit f980aa1

Please sign in to comment.