Webtrees is an open source web server application that renders genealogy data from a GEDCOM file in a nice navigatable web site. The data can be edited and pictures can be added. Check out their website.
docker network create Webtrees-Net
docker volume create Webtrees-Data
# THINK: do you want default passwords on the db?
# if not, modify them in the file docker-compose.yml
# under 'environment'!
docker-compose up -d --build
Then open: http://localhost:8180
The Database paramters are:
- Server name: Webtrees_mysql_db
- Port number: 3306
- Database user account: wt
- Database password: password
Database and table names:
- Database name: webtrees
- Table prefix: leave unchaged
Administrator account
- Your Name: Bob Smith
- Username: bob
- Password: password
- E-mail address: nobody@gmail.com
Now head over to: https://www.webtrees.net In particular to: https://wiki.webtrees.net/en/Users_Guide
docker-compose down
docker network rm Webtrees-Net
docker volume rm Webtrees-Data
docker volume prune
The genealogy data is kept in the MySql database container that was started. If you stop and restart this container the data remains. If you delete this container the data is gone.
To extract the genealogy data you captured in webtrees click on My page > Control panel > Family trees > Manage family trees > GEDCOM file Export > A file on your computer - continue. This will create a gedcom file that you can keep as a backup and can later import.
Media files that you upload are kept in the docker volume named Webrtrees-Data. This is mounted to the Webtrees_webserver and Webtrees_php_fpm container. These files will stay around for as long as the volume stays around. If you want to copy the images to a safe place use the docker cp
command:
docker cp Webtrees_webserver:/var/www/data/media .
The docker-compose.yml file declares the 3 containers that are used. The 3 containers will connect with each other over the Docker internal network Webtrees-Net.
The configuration data for the Webtrees app and the media files will reside on the Webtrees-Data volume.
This container is defined by the Dockerfile (of the same name) and inherits from nginx. It receives a customised vhost.conf which forwards requests for php scripts to the fcgi container.
The nginx.conf is modified to allow image uploads up to 40M as the default is unusable.
The container is then populated with the webtrees code.
The startup starts fcgiwrap and then nginx in non daemon mode.
The webserver will run on port 8180. Change that to whatever you like in the docker-compose.yml and vhost.conf file.
The php scripts are run from a separate container. This inherits from php:7-fpm. Fastcgi acts as glue between the nginx container and the fpm container communicating over port 9000 on a private Docker network.
The Dockerfile-php adds libpng, freetype, libjpeg, libxml2 and unzip to the container. It also installs mysqli, pdo, pdo_mysql and xml as well as gd.
Webtrees is intalled into both containers so that the web container has the static images and the php container has the scripts.
The database uses the mysql image from Dockerhub as-is.
The docker-compose.yml file lists the username and password that will be used when the server starts up. You are advised to change this to something secure.
The database is not visible to the host and tools like phpmysqladmin will not find it. Add a port mapping to the docker-compose.yml file if you want to connect to the db.
The below command lists all running containers.
docker ps
You can connect to a running container and use the shell to check things:
docker exec -it Webtrees_webserver bash
docker exec -it Webtrees_php_fpm bash
For instance the following command shows the contents of the webserver directory:
ls /var/www
The webserver logs are redirected to stdout and stderr of the container and can be viewed with
docker logs Webtrees_webserver