├── LICENSE ├── compose_64 └── docker-compose.yml ├── compose_arm64 └── docker-compose.yml ├── Dockerfile └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023-2025 REI3 development team 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /compose_64/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | r3_db: 3 | container_name: r${R3_VERSION:-3.11.5}_db 4 | environment: 5 | POSTGRES_DB: ${R3_DB_NAME:-app} 6 | POSTGRES_USER: ${R3_DB_USER:-app} 7 | POSTGRES_PASSWORD: ${R3_DB_PASS:-app} 8 | image: postgres:16 9 | restart: always 10 | volumes: 11 | - data_db:/var/lib/postgresql/data 12 | r3: 13 | build: 14 | context: https://github.com/r3-team/r3_docker.git#main 15 | args: 16 | r3_version: ${R3_VERSION:-3.11.5} 17 | r3_db_host: r3_db 18 | r3_db_name: ${R3_DB_NAME:-app} 19 | r3_db_user: ${R3_DB_USER:-app} 20 | r3_db_pass: ${R3_DB_PASS:-app} 21 | r3_os_arch: x64 22 | im_policy: /etc/ImageMagick-6/policy.xml 23 | container_name: r${R3_VERSION:-3.11.5}_app 24 | image: r3:${R3_VERSION:-3.11.5} 25 | depends_on: 26 | - r3_db 27 | ports: 28 | - "14000:80" 29 | pull_policy: never 30 | restart: always 31 | volumes: 32 | - data_app:/opt/r3/data 33 | volumes: 34 | data_db: 35 | data_app: 36 | -------------------------------------------------------------------------------- /compose_arm64/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | r3_db: 3 | container_name: r${R3_VERSION:-3.11.5}_db 4 | environment: 5 | POSTGRES_DB: ${R3_DB_NAME:-app} 6 | POSTGRES_USER: ${R3_DB_USER:-app} 7 | POSTGRES_PASSWORD: ${R3_DB_PASS:-app} 8 | image: postgres:16 9 | restart: always 10 | volumes: 11 | - data_db:/var/lib/postgresql/data 12 | r3: 13 | build: 14 | context: https://github.com/r3-team/r3_docker.git#main 15 | args: 16 | r3_version: ${R3_VERSION:-3.11.5} 17 | r3_db_host: r3_db 18 | r3_db_name: ${R3_DB_NAME:-app} 19 | r3_db_user: ${R3_DB_USER:-app} 20 | r3_db_pass: ${R3_DB_PASS:-app} 21 | r3_os_arch: arm64 22 | im_policy: /etc/ImageMagick-6/policy.xml 23 | container_name: r${R3_VERSION:-3.11.5}_app 24 | image: r3:${R3_VERSION:-3.11.5} 25 | depends_on: 26 | - r3_db 27 | ports: 28 | - "14000:80" 29 | pull_policy: never 30 | restart: always 31 | volumes: 32 | - data_app:/opt/r3/data 33 | volumes: 34 | data_db: 35 | data_app: 36 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # REI3 development & testing dockerfile - do not use in production 2 | # Prepared by Gabriel Herbert (Lean Softworks GmbH) 3 | FROM ubuntu:25.04 4 | 5 | ARG r3_db_host 6 | ARG r3_db_name 7 | ARG r3_db_user 8 | ARG r3_db_pass 9 | ARG r3_os_arch 10 | ARG r3_version 11 | ARG im_policy 12 | 13 | # setup environment 14 | # * Create directories: App + data 15 | # * Install dependencies: ImageMagick, Ghostscript, PostgreSQL-Client, root CAs 16 | # * Enable PDF processing for ImageMagick 17 | RUN bash -c 'mkdir -p /opt/r3/data/{certificates,files,temp,transfer}' \ 18 | && apt-get update \ 19 | && apt-get install imagemagick ghostscript postgresql-client ca-certificates -y \ 20 | && update-ca-certificates \ 21 | && if [ -f $im_policy ] ; then sed -i 's///g' $im_policy ; else echo no file $im_policy ; fi 22 | 23 | # setup REI3 proper 24 | # * Extract files from official package: Binary + config template 25 | # * Overwrite config settings: DB hostname, web server port 26 | # * Set permissions 27 | # * Delete release package 28 | WORKDIR /opt/r3 29 | ADD https://rei3.de/downloads/REI3_${r3_version}_${r3_os_arch}_linux.tar.gz . 30 | RUN tar -xvf REI3_${r3_version}_${r3_os_arch}_linux.tar.gz r3 config_template.json \ 31 | && sed -i "s/localhost/${r3_db_host}/g" config_template.json \ 32 | && sed -i "s/443/80/g" config_template.json \ 33 | && sed -i "s/\"name\": \"app\"/\"name\": \"${r3_db_name}\"/g" config_template.json \ 34 | && sed -i "s/\"user\": \"app\"/\"user\": \"${r3_db_user}\"/g" config_template.json \ 35 | && sed -i "s/\"pass\": \"app\"/\"pass\": \"${r3_db_pass}\"/g" config_template.json \ 36 | && chmod 755 r3 && chmod 644 config_template.json \ 37 | && rm REI3_${r3_version}_${r3_os_arch}_linux.tar.gz 38 | 39 | # run REI3 on HTTP 40 | EXPOSE 80 41 | CMD ["/opt/r3/r3", "-run", "-http", "-config", "/opt/r3/data/config.json"] 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # REI3 dockerfile 2 | Repository for an example implementation of REI3 in Docker. It includes: 3 | * A dockerfile to get a working REI3 image. 4 | * Docker Compose files for x64 and arm64 architectures to get a complete REI3 system up and running. 5 | 6 | This Docker release has been designed for development and testing purposes. Please do not use this configuration for running REI3 in production. 7 | 8 | ## How to use 9 | 1. Make sure that Docker & Docker Compose are available on your system. 10 | 1. Download the Docker Compose file for your OS architecture (x64/arm64) from [rei3.de](https://rei3.de/en/downloads) to a location of your choice. 11 | 1. Inside the chosen directory, run: `docker compose up` 12 | 1. Once you get `Starting web server [...]` REI3 is ready to be used. 13 | 1. Use a modern browser to access REI3. 14 | * By default, you can access REI3 at `http://localhost:14000` 15 | * Default username/password are both `admin` 16 | 17 | ## How to upgrade REI3 18 | When the Docker / Docker Compose files are unchanged, you can follow this guide to upgrade REI3. If you made changes to these files, please disregard the following as it cannot account for your changes. In any case, make sure to backup your data before attempting to upgrade your REI3 system. 19 | 20 | To upgrade, set the environment variable R3_VERSION to the desired version (such as 3.9.2), then execute docker compose up in your corresponding docker directory. 21 | 22 | Under Linux an upgrade procedure from REI3.8.6 to REI3.9.2 could look like this: 23 | * `export R3_VERSION=3.9.2` 24 | * `docker compose up` 25 | 26 | ## How to deploy an older version of REI3 27 | Set the environment variable R3_VERSION to the version you desire before running `docker compose up`. Examples: 28 | * Linux 29 | * `export R3_VERSION=3.9.2` 30 | * Windows 31 | * `SET R3_VERSION=3.9.2` 32 | 33 | The chosen version must be available on [rei3.de](https://rei3.de/en/downloads) under `all releases`. You cannot downgrade existing REI3 instances as the DB cannot be downgraded automatically. Please make sure to have recent backups available before upgrading to a later release. 34 | 35 | ## Environment parameters 36 | * R3_VERSION: Which REI3 version to run. Useful for deploying older versions or upgrading existing REI3 containers. 37 | * R3_DB_NAME: Name of the PostgreSQL DB, should you want to overwrite it. 38 | * R3_DB_USER: Name of the PostgreSQL role, should you want to overwrite it. 39 | * R3_DB_PASS: Passwort of the PostgreSQL role, should you want to overwrite it. --------------------------------------------------------------------------------