Git Product home page Git Product logo

webtrees's Introduction

Build Webtrees Docker Pulls GitHub tag (latest by date)

docker-webtrees

webtrees is a free open source web-based genealogy application intended for collaborative use. It is compatible with standard 5.5.1-GEDCOM files. In this docker image based on phusion webtrees is provided. A database is not embedded in this image.

Since 12/07/19 version 2.0 is officially released and also provided by this repository as docker image.

This container now supports multiple architectures. That allows to run this image for example also on a Raspberry Pi. Please use the corresponding newly introduced image tags using the following syntax: <webtrees version>-<build version>-<architecture> Supported architectures are: amd64, arm32v7, arm64v8, i386, ppc64le, s390x

Usage

docker run -d -p 8088:8079 --name webtrees --link mysql:db -v /webtrees/data:/var/www/html/data -e GROUP_ID=999 -e PORT=8079 --restart always dtjs48jkt/webtrees

After starting the docker container go to:

https://server or https://server:port if you have defined an alternative port

Update Functionality

This docker image is based on Ubuntu. On each start of the container an update of the used Ubuntu packages could be performed. Due to the running update it might take a little longer until the application webtrees is available. This auto-update functionality has (now) to be activated explicitly (-e UPDATE_ON_START=TRUE).

Persistent storage of data

Configuration and media files should be stored outside the container. Therefor you should create a directories that is mapped to the container internal directory /var/www/html/data. In the container apache is running under user www-data [33] (group www-data[33]). The directory must therfore be read- and writable for this user. If this is not possible you can use the alternative and use the parameter GROUP_ID to inform the container about the group that has read and write access to those folders.

Database

The image does not contain a MySQL database. Instead you have to use a separate MySQL instance. For example you could use the MySQL Docker Image. Using the --link parameter a direct connection to the database in an other container could be established. If you use the --link parameter it is sufficient to set as database hostname db and port 3306. This can be set during the initial setup in the wizard or directly in the file config.ini.php (in data directory /var/www/html/data). The database user must have all access rights to create the necessary database and tables.

Logging

Log data of the contained web-server is written in the files in the folder /var/log/apache2/. If access to those files is necessary this location could be mapped to an external volume.

Port of Apache web server / Encryption

This image supports per default https based communication on port 443. Alternatively you can use this image also only using http, e.g. if you only use it within your home network.

Details on encryption

If it is necessary to change the default port (e.g. in case of collisions) you can set the optional parameter PORT to a different value. The https communication is based on a self signed certificate. It is possible to use an alternative certificate. Therfore you have to map the internal folder /crt to an external location. This folder should contain the two files webtrees.key (Key without password protection) und webtrees.crt (certificate). It is not possible to change further encryption settings from outside the container. If you want a more sofisticated encryption you should use a reverse proxy in front of the webtrees container.

Using http only

It is possible to use the image without https support. For that you have to start the container with the following environament variables set.

docker run -d -p 80:80 --name webtrees --link mysql:db -v /webtrees/data:/var/www/html/data -e DISABLE_SSL=TRUE -e PORT=80 --restart always dtjs48jkt/webtrees

Usage of additional 3rd party modules

It is possible to use additional 3rd party modules of webtrees with this container. To use such modules it is necessary to mount those folders containing the module into the following location -v /var/www/html/modules_v4/<modulexxx>

Using Pretty URLs

It is possible to use pretty urls with this image. You can set in the config.ini.php file the following attributes:

redirect_urls="1"
base_url="http://localhost"

When using pretty urls it is necessary to set also the base_url. Otherwise you will end up with an error "Too many redirects".

It is also possible to active pretty urls by using environment variables. You could set -e PRETTYURLS=TRUE and -e BASE_URL=http://localhost. This will set the necessary settings in the config.ini.php.

Automatic initialization of database

For MySQL or MariaDB it is possible to use an automatical initalization of the database within the application. User the parameters to DB_* and WT_* to set the corresponding values. To possible error of the initialization start the container in interactve mode using -it.

Support for PostgreSQL or SQLServer

This image contains now the necessary libraries to optionally also select PostgreSQL or SQLServer as db storage in the setup wizard.

Parameters

  • -v /var/www/html/data - Where webtrees server stores its config files
  • -v /etc/localtime - Set to use the correct time of host
  • -e GROUP_ID - allow access to mapped volumes
  • -e PORT - change port web server listens on
  • -e UPDATE_ON_START - if set to TRUE the auto-update functionality on restart is activated
  • -e ENABLE_REMOTE_USER - if set to TRUE use header variable REMOTE_USER for authentication
  • -e HEADER_AUTH_VAR - Sets the name of header variable used for authentication. Default is REMOTE_USER.
  • -e DISABLE_SSL - if set to TRUE the image only provides an http entpoint. You should also set the port, because default port 443 is not modifed by this setting.
  • -e DB_USER - can only be used at first instantiation to set the db username. Password (DB_PASSWORD) must also be set (see below), otherwise no initial setup is performed. If not present (only DB_PASSWORD is present) the default will be root.
  • -e DB_PASSWORD - can only be used at first instantiation to set the db setting during instantiation and perform initial application setup.
  • -e DB_HOST - can only be used at first instantiation to set the db hostname (or ip). Password (DB_PASSWORD) must also be set (see above), otherwise no initial setup is performed. If not present (only DB_PASSWORD is present) the default will be localhost.
  • -e DB_PORT - can only be used at first instantiation to set the db port. Password (DB_PASSWORD) must also be set (see above), otherwise no initial setup is performed. If not present (only DB_PASSWORD is present) the default will be 3306.
  • -e DB_NAME - can only be used at first instantiation to set the db name. Password (DB_PASSWORD) must also be set (see above), otherwise no initial setup is performed. If not present (only DB_PASSWORD is present) the default will be webtrees.
  • -e WT_ADMIN - can only be used at first instantiation to set the initial webtrees admin user account name. Password (DB_PASSWORD) must also be set (see above), otherwise no initial setup is performed. If not present (only DB_PASSWORD is present) the default will be admin.
  • -e WT_ADMINPW - can only be used at first instantiation to set the initial webtrees admin user account password. Password (DB_PASSWORD) must also be set (see above), otherwise no initial setup is performed. If not present (only DB_PASSWORD is present) the default will be admin123.
  • -e WT_ADMINMAIL - can only be used at first instantiation to set the initial webtrees admin user account mail address. Password (DB_PASSWORD) must also be set (see above), otherwise no initial setup is performed. If not present (only DB_PASSWORD is present) the default will be [email protected].
  • -e PRETTYURLS - set to TRUE to allow usage of pretty urls.
  • -e BASE_URL - set to the correct url to allow usage of pretty urls.

Versions

  • 2017/10/13: Initial release. webtrees 1.7.9
  • 2018/06/27: Webtrees 1.7.9 - Added switch to active/deactive auto update functionality
  • 2018/08/30: Webtrees 1.7.10 - Now using baseimage Ubuntu 18.04 / Added possibility to use external authentication using REMOTE_USER
  • 2019/01/13: Webtrees 1.7.12
  • 2019/05/08: Webtrees 1.7.14
  • 2019/12/10: Webtrees 1.7.16
  • 2019/12/10: Webtrees 2.0.0
  • 2020/01/06: Webtrees 2.0.1
  • 2020/01/13: Webtrees 2.0.1 - Added possibility to use image without https (only http) for local networks
  • 2020/01/16: Webtrees 2.0.1 - Added multi arch support
  • 2020/02/01: Webtrees 2.0.2
  • 2020/03/06: Webtrees 2.0.2 - Added support to automatically initialize db and webtrees. Provided K8S template for example deployment.
  • 2020/03/18: Webtrees 2.0.3 - Update to Webtrees 2.0.3
  • 2020/05/18: Webtrees 2.0.4 - Update to Webtrees 2.0.4
  • 2020/05/18: Webtrees 1.7.17 - Update to Webtrees 1.7.17
  • 2020/06/04: Webtrees 2.0.5 - Update to Webtrees 2.0.5
  • 2020/06/08: Webtrees 2.0.5 - Fixed PGSQL support
  • 2020/06/14: Webtrees 2.0.5 - Security Fix: Forbid access to data folder by apache
  • 2020/06/18: Webtrees 2.0.6
  • 2020/07/27: Webtrees 2.0.7
  • 2020/08/11: Webtrees 2.0.7 - Fixed documentation, removed separate media folder from v1.x and updated module path for version v2.x.
  • 2020/10/04: Webtrees 2.0.8
  • 2020/10/10: Webtrees 2.0.9
  • 2020/10/18: Webtrees 2.0.9 - Fixed auto setup of MySQL/MariaDB. (Added missing files - Issue #25)
  • 2020/10/24: Webtrees 2.0.10
  • 2021/01/04: Webtrees 2.0.11 - Added support for pretty urls
  • 2021/03/11: Webtrees 2.0.12
  • 2021/03/14: Webtrees 2.0.13
  • 2021/03/29: Webtrees 2.0.14
  • 2021/03/31: Webtrees 2.0.15
  • 2021/05/03: Webtrees 2.0.16
  • 2021/10/11: Webtrees 2.0.17
  • 2021/12/10: Webtrees 2.0.19
  • 2022/03/16: Webtrees 2.0.20
  • 2022/03/16: Webtrees 2.0.21
  • 2022/03/22: Webtrees 2.0.22
  • 2022/04/03: Webtrees 2.0.23
  • 2022/04/08: Webtrees 2.0.23 - Added configurable auth header
  • 2022/06/04: Webtrees 2.0.24
  • 2022/06/20: Webtrees 2.0.25
  • 2022/11/28: Webtrees 2.0.26

webtrees's People

Contributors

cbenning avatar ed-solis avatar h2ck avatar rockfordlhotka avatar sachinwadhwa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

webtrees's Issues

missing files

hello
today i tried to run this docker container..
i want to open the site and .. nothing happend..

i end up with the knowledge that some files + packages are missing
the files the container missed:

  • 06_initialize_db.sh
  • webtrees.sql
  • config.ini.php
  • the command "mysql" ist missing, too .. so it's needed to install mysql-client perhaps..

i think there is a lack of other files but i don't know

Tagging semantics for latest

It is common use, that the latest tag contains the multiarch images from the latest released version. At the moment under latest only is an amd64 architecture image that has not the same hash as the amd64 image from the v2.0.2-0.
If you want an image from the lastest source you should call it master.

Empty user

Hello, I try to setup webtrees using docker-compose.
Everything works fine database is created, and populated, but no user is created and I can't figure out why.

Could you help me, please ?

.env
APP_NAME="webtrees"
APP_PROJECT=webtrees
APP_DOMAIN=webtrees.mydomain.com

MARIADB_RANDOM_ROOT_PASSWORD=true
MYSQL_DATABASE=webtrees
MYSQL_USER=app_user
MYSQL_PASSWORD=secret
TZ=Europe/Paris

# https://github.com/H2CK/webtrees#parameters
# UPDATE_ON_START=true
GROUP_ID=999
DISABLE_SSL=TRUE
PORT=80
PRETTYURLS="1"
BASE_URL="http://${APP_DOMAIN}"
DB_HOST="${APP_PROJECT}-mariadb"
DB_USER="${MYSQL_USER}"
DB_PASSWORD="${MYSQL_PASSWORD}"
# DB_PORT=
DB_NAME="${MYSQL_DATABASE}"
WT_ADMIN="loranger"
WT_ADMINPW="my_password"
WT_ADMINMAIL="[email protected]"
docker-compose.yml
version: '3'

services:

  webtrees:
    container_name: ${APP_PROJECT}-webtrees
    image: dtjs48jkt/webtrees:latest
    # volumes:
      # - ./datas:/var/www/html/data
    env_file:
      - .env
    restart: always
    depends_on:
      - mariadb
    labels:
      - "traefik.http.routers.${APP_PROJECT}.rule=Host(`${APP_DOMAIN}`)"
      - "traefik.http.services.${APP_PROJECT}-service.loadbalancer.server.port=80"

  mariadb:
    container_name: ${APP_PROJECT}-mariadb
    image: mariadb:latest
    env_file:
      - .env
    volumes:
      - ./database:/var/lib/mysql
    labels:
      - "traefik.enable=false"

  adminer:
    container_name: ${APP_PROJECT}-adminer
    image: adminer:latest
    environment:
        ADMINER_DEFAULT_SERVER: ${DB_HOST}
        ADMINER_DESIGN: flat
    profiles:
      - adminer
    labels:
      - "traefik.http.routers.${APP_PROJECT}-adminer.rule=Host(`adminer.${APP_DOMAIN}`)"
      - "traefik.http.services.${APP_PROJECT}-adminer-service.loadbalancer.server.port=8080"

networks:
  default:
      name: web

Internal webtrees directories are exposed

Some directories that are not expected to be published are available via browser.

Steps to reproduce:

  1. Prepare a database container called "mysql"
  2. Launch container docker run -d -p 8443:443 --name webtrees --link mysql:db dtjs48jkt/webtrees:v2.0.5-1
  3. Open https://localhost:8443 in browser, set up: database details, user and example tree
  4. Open https://localhost:8443/data/config.ini.php. A semicolon is displayed.

According to Webtrees github:

In the unlikely event you do fetch the file (you will just see a semicolon), then that protection is not working on your site and you should take some further action.

Problem connecting to MySQL database

Not sure if this is the right place searching for help.

Overnight my installation of webtrees stopped working so I decided to do a fresh install - still using the same database and location for the data files.

When running the docker container with:

docker run -d -p 8089:8079 --name webtrees -e BASE_URL=https://mywebsite.com -v /webtrees/data:/var/www/html/data -e GROUP_ID=999 -e PORT=8079 -e DB_USER=root -e DB_PASSWORD=**** -e DB_HOST=172.20.0.2 -e DB_PORT=3306 -e DB_NAME=webtrees --restart always dtjs48jkt/webtrees:2.1.16

I get this error:

`RuntimeException:
SQLSTATE[HY000] [2002] No route to host in /var/www/html/app/Http/Middleware/UseDatabase.php:119

Stack trace: #0 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseDatabase->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#1 /var/www/html/app/Http/Middleware/BadBotBlocker.php(282): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#2 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BadBotBlocker->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#3 /var/www/html/app/Http/Middleware/CompressResponse.php(73): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#4 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CompressResponse->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#5 /var/www/html/app/Http/Middleware/ContentLength.php(40): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#6 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ContentLength->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#7 /var/www/html/vendor/middlewares/client-ip/src/ClientIp.php(65): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#8 /var/www/html/app/Http/Middleware/ClientIp.php(47): Middlewares\ClientIp->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#9 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ClientIp->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#10 /var/www/html/app/Http/Middleware/HandleExceptions.php(90): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#11 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\HandleExceptions->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#12 /var/www/html/app/Http/Middleware/BaseUrl.php(73): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#13 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BaseUrl->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#14 /var/www/html/app/Http/Middleware/ReadConfigIni.php(68): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#15 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ReadConfigIni->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#16 /var/www/html/app/Http/Middleware/SecurityHeaders.php(48): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#17 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\SecurityHeaders->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#18 /var/www/html/app/Http/Middleware/EmitResponse.php(57): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#19 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\EmitResponse->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#20 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(118): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#21 /var/www/html/app/Webtrees.php(275): Middleland\Dispatcher->dispatch(Object(Nyholm\Psr7\ServerRequest))
#22 /var/www/html/app/Webtrees.php(262): Fisharebest\Webtrees\Webtrees::dispatch(Object(Nyholm\Psr7\ServerRequest), Array)
#23 /var/www/html/index.php(51): Fisharebest\Webtrees\Webtrees->httpRequest()
#24 {main}`

I'm able to access the database from the container so I don't think it's firewall related.

Pretty URLs

Hello, how to enable URL rewrite as shown here ?
I tried to map a .htaccess to /var/www/html/.htaccess but it looks like the rewrite mod is not enabled.
How can I do it ? And would it be possible to add an option to do it automatically ?

Custom authentication header

Hello,
Is it possible to add an option to set a custom authentication header instead of REMOTE_USER ?
For example, Authentik use another header : X-Authentik-Username
Thanks !

(Sorry for my bad English, it's not my native language)

WT_ADMINPW not hashed properly on creation

When I set WT_ADMINPW, the created admin account gets a hashed password saved as *0 in the database. So I can't log in with that account.

It's seems like an issue with a change in how PHP crypt() function works.

If I don't set DB_PASSWORD and just go through the manual set up, everything works as expected.

ErrorException: file(/var/www/html/app/../resources/lang/de/messages.po): failed to open stream: No such file or directory in /var/www/html/vendor/fisharebest/localization/src/Translation.php:56

Hello ;)
now i have another error. I don't know if i could change something
i used the latest container image.
This exception is displayed in the browser if i tried to open the website

ErrorException: file(/var/www/html/app/../resources/lang/de/messages.po): failed to open stream: No such file or directory in /var/www/html/vendor/fisharebest/localization/src/Translation.php:56
Stack trace:
#0 [internal function]: Fisharebest\Webtrees\Webtrees::Fisharebest\Webtrees\{closure}(2, 'file(/var/www/h...', '/var/www/html/v...', 56, Array)
#1 /var/www/html/vendor/fisharebest/localization/src/Translation.php(56): file('/var/www/html/a...')
#2 /var/www/html/app/I18N.php(306): Fisharebest\Localization\Translation->__construct('/var/www/html/a...')
#3 /var/www/html/app/Http/Middleware/UseLanguage.php(67): Fisharebest\Webtrees\I18N::init('de')
#4 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseLanguage->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#5 /var/www/html/app/Http/Middleware/UseSession.php(71): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#6 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseSession->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#7 /var/www/html/app/Http/Middleware/UpdateDatabaseSchema.php(58): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#8 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UpdateDatabaseSchema->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#9 /var/www/html/app/Http/Middleware/UseDebugbar.php(67): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#10 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseDebugbar->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#11 /var/www/html/app/Http/Middleware/UseDatabase.php(117): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#12 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseDatabase->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#13 /var/www/html/app/Http/Middleware/BadBotBlocker.php(212): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#14 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BadBotBlocker->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#15 /var/www/html/app/Http/Middleware/RegisterFactories.php(72): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#16 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\RegisterFactories->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#17 /var/www/html/vendor/middlewares/client-ip/src/ClientIp.php(81): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#18 /var/www/html/app/Http/Middleware/ClientIp.php(47): Middlewares\ClientIp->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#19 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ClientIp->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#20 /var/www/html/app/Http/Middleware/HandleExceptions.php(90): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#21 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\HandleExceptions->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#22 /var/www/html/app/Http/Middleware/BaseUrl.php(77): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#23 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BaseUrl->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#24 /var/www/html/app/Http/Middleware/ReadConfigIni.php(69): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#25 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ReadConfigIni->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#26 /var/www/html/app/Http/Middleware/SecurityHeaders.php(47): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#27 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\SecurityHeaders->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#28 /var/www/html/app/Http/Middleware/EmitResponse.php(57): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#29 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\EmitResponse->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#30 /var/www/html/app/Http/Middleware/PhpEnvironment.php(49): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#31 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\PhpEnvironment->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#32 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(118): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#33 /var/www/html/index.php(57): Middleland\Dispatcher->dispatch(Object(Nyholm\Psr7\ServerRequest))
#34 {main}

Missing sendmail

Hi,

It seems sendmail is missing from docker image. Can you add it and have a SMTP configuration stage added in the shell script used for initial setup ?

Thanks for all the work done, and thanks in advance for this one :-)

Documentation

Therefor you should create two directories that are mapped to the container internal directories /var/www/html/data and /var/www/html/media.

This was true for webtrees 1.x

Since webtrees 2.x, the media folder is inside the data folder. So only the data folder is needed.

3rd party modules

The directory for 3rd party modules in README.md is modulesv3. Should it be modules_v4 for version 2.0+?

Modules not loading.

I have added a custom module under the modules_v4 folder, but it is not showing up anywhere (even under preferences). I am using the latest version (2.1.1) of Webtrees in docker and I am using the descendants chart, which was updated to support the latest release. Here's my docker-compose file:

version: '3.0'

services:
  webtrees:
    image: dtjs48jkt/webtrees
    restart: unless-stopped
    container_name: webtrees
    ports:
      - 8079:8079
    environment:
      - DISABLE_SSL=TRUE
      - PORT=8079
    volumes:
      - /mnt/docker/containers/webtrees/data:/var/www/html/data
      - /mnt/docker/containers/webtrees/modules_v4:/var/www/html/modules_v4
      - /mnt/docker/containers/webtrees/media:/var/www/html/media
    networks:
      - my-network
  
  mysql:
    image: mysql:5.5
    restart: unless-stopped
    container_name: webtrees_mysql
    environment:
      - MYSQL_ROOT_PASSWORD=PASSWORD
      - MYSQL_DATABASE=webtrees
      - MYSQL_USER=webtrees
      - MYSQL_PASSWORD=PASSWORD
    networks:
      - my-network
    volumes:
      - /mnt/docker/containers/webtrees_mysql:/var/lib/mysql
networks:
  my-network:

Everything is working except for the custom modules. It does not even show up in modules:
image

Unable to start

Hello

I keep getting this error when opening the site:

RuntimeException: SQLSTATE[HY000] [2002] No such file or directory in /var/www/html/app/Http/Middleware/UseDatabase.php:114 Stack trace: #0 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseDatabase->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #1 /var/www/html/app/Http/Middleware/BadBotBlocker.php(212): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #2 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BadBotBlocker->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #3 /var/www/html/app/Http/Middleware/RegisterFactories.php(72): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #4 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\RegisterFactories->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #5 /var/www/html/vendor/middlewares/client-ip/src/ClientIp.php(81): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #6 /var/www/html/app/Http/Middleware/ClientIp.php(47): Middlewares\ClientIp->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #7 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ClientIp->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #8 /var/www/html/app/Http/Middleware/HandleExceptions.php(90): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #9 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\HandleExceptions->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #10 /var/www/html/app/Http/Middleware/BaseUrl.php(77): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #11 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BaseUrl->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #12 /var/www/html/app/Http/Middleware/ReadConfigIni.php(69): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #13 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ReadConfigIni->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #14 /var/www/html/app/Http/Middleware/SecurityHeaders.php(47): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #15 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\SecurityHeaders->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #16 /var/www/html/app/Http/Middleware/EmitResponse.php(57): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #17 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\EmitResponse->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #18 /var/www/html/app/Http/Middleware/PhpEnvironment.php(49): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #19 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\PhpEnvironment->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #20 /var/www/html/vendor/oscarotero/middleland/src/Dispatcher.php(118): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #21 /var/www/html/index.php(57): Middleland\Dispatcher->dispatch(Object(Nyholm\Psr7\ServerRequest)) #22 {main}

Using the following docker-compose.yml

version: '3.0'

services:
  webtrees:
    image: dtjs48jkt/webtrees
    restart: always
    ports:
      - 88:80
    environment:
      - DISABLE_SSL=TRUE
      - PORT=80
    volumes:
      - /webtrees/data:/var/www/html/data
      - /webtrees/media:/var/www/html/media

Shouldn't I see the DB setup config page?

Admin User Creation

I am unable to login using the admin credentials I specified when creating the container. The error message reads:

The username or password is incorrect.

I see there are no records in the user database table, but I'm not sure if that is where the admin credentials are stored.

Here is my Run command on Linux AMD64 and Docker version 18.06.0-ce. This was created about 13 days ago, so I'm thinking this is image v2.0.10-0.

docker run -d \
 -p 8088:8079 \
 --name webtrees \
 -v /webtrees/data:/var/www/html/data \
 -e GROUP_ID=1000 \
 -e PORT=8079 \
 -e UPDATE_ON_START=TRUE \
 -e DB_USER=webtrees_user \
 -e DB_PASSWORD=DBPassword \
 -e DB_HOST=10.10.10.10 \
 -e DB_PORT=3307 \
 -e DB_NAME=webtrees_db \
 -e WT_ADMIN=AdminName \
 -e WT_ADMINPW=AdminPassword \
 -e [email protected] \
 --restart always \
 dtjs48jkt/webtrees

I see no one else has reported this issue, so it must be something I am doing wrong.

Thank you in advance!

Add option to configure max uploaded file size via env variables

Hi,
it would be very practical if you could also determine the maximum upload size of the files via the Docker env variables.
This is set to 2M by default and is often too small for current files. Currently, this would have to be adjusted by changing the php.ini in the container.

Upgrade PHP version?

This docker image got me started very quickly, thank you!

Do you have any plans to update the PHP version?

Screen Shot 2020-12-08 at 2 14 32 PM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.