diff --git a/Dockerfile b/Dockerfile index ac22859..720058e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,52 +1,38 @@ -FROM ubuntu:16.04 +FROM i386/debian:wheezy -MAINTAINER Florian Schüller +MAINTAINER Wolfgang Hottgenroth # This is where your data is ENV GENEWEBDB /genewebData - -# Location specific to ubuntu installation -ENV GENEWEBSHARE /usr/share/geneweb -# Location specific to ubuntu installation -ENV GENEWEBDOC /usr/share/doc/geneweb - -# Temporary logfile used for setup -ENV SETUP_LOGFILE /tmp/setup_log.txt +ENV GENEWEBSHARE /opt/geneweb/gw # HTTP Port where geneweb is running ENV PORT 2317 -# HTTP Port only used for setup purposes (when you don't have a database yet) -ENV SETUP_PORT 2316 - # Language of interface and setup ENV LANGUAGE de EXPOSE ${PORT} -EXPOSE ${SETUP_PORT} RUN \ apt-get update && \ - apt-get -y install --no-install-recommends gwsetup geneweb && \ - rm -rf /var/lib/apt/lists/* + apt-get -y install wget && \ + rm -rf /var/lib/apt/lists/* + +RUN \ + cd /tmp && wget --no-check-certificate https://github.com/geneweb/geneweb/releases/download/v5.02/gw-5.02-linux.tar && \ + tar -xf gw-5.02-linux.tar && \ + cd /opt && mkdir geneweb && \ + mv /tmp/distribution/* /opt/geneweb -# seems to be some bug of "gwsetup" -RUN ln -s /usr/bin/gwc2 /usr/share/geneweb/gwc2 -RUN ln -s /usr/bin/gwb2ged /usr/share/geneweb/gwb2ged -RUN ln -s /usr/bin/gwu /usr/share/geneweb/gwu -RUN ln -s /usr/bin/ged2gwb /usr/share/geneweb/ged2gwb COPY scripts/bootstrap.sh / -RUN chmod a+x /bootstrap.sh +RUN chmod a+x /bootstrap.sh + +COPY scripts/README-SETUP.txt / -COPY scripts/start_setup.sh / -RUN chmod a+x /start_setup.sh VOLUME ${GENEWEBDB} -# The IP of the Docker host - setup needs this to enable access -ENV HOST_IP 172.17.0.1 - -RUN echo ${HOST_IP} > /setup_ips.txt - CMD ["/bootstrap.sh"] + diff --git a/LICENSE b/LICENSE index ce8a844..89bc557 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2016 Florian Schüller +Copyright (c) 2018 Wolfgang Hottgenroth Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md deleted file mode 100644 index 8109273..0000000 --- a/README.md +++ /dev/null @@ -1,64 +0,0 @@ -# docker-geneweb -Dockerized installation of [Geneweb](https://en.wikipedia.org/wiki/GeneWeb) - -## Usage - -Usually you want to keep your database so to keep your data in an *existing* directory e.g. `${HOME}/GenealogyData` - -Just run the container: -``` -docker run --env LANGUAGE=de -d --name geneweb -p2316:2316 -p2317:2317 -v ${HOME}/GenealogyData:/genewebData schuellerf/geneweb:latest -``` - -and go to [http://localhost:2317](http://localhost:2317) - -if you happen to have the git repository you can also execute: -``` -./start.sh -``` - -**note:** the directory `${HOME}/GenealogyData` has to be a *full path* - -## Setup -The setup will be started automatically [http://localhost:2316](http://localhost:2316) if no database can be found - -If you start the container and you already have a database but you want more databases or do some backup you need to start the setup manually like so: - -``` -docker exec geneweb /start_setup.sh -``` -and then navigate to [http://localhost:2316](http://localhost:2316) - -## Options -If you need to change the IP of the Docker host or better, of the PC you want to use the [setup](http://localhost:2316) from -you can override the default value by _adding_ the option - -``` ---env HOST_IP=192.168.0.1 -``` - -to the `docker run` mentioned above. - -e.g. -``` -docker run --env HOST_IP=192.168.0.1 --env LANGUAGE=de -d --name geneweb -p2316:2316 -p2317:2317 -v ${HOME}/GenealogyData:/genewebData schuellerf/geneweb:latest -``` - -## Shutdown - -To shutdown the container just run -``` -docker stop geneweb -docker rm geneweb -``` - -## Backup -If you need to do a backup just either backup your data folder (e.g. `${HOME}/GenealogyData`) - -To export the data as "*.ged" file or similar you need to start the "setup" tool - -``` -docker exec -ti geneweb /start_setup.sh -``` -and then navigate to [http://localhost:2316](http://localhost:2316) - diff --git a/build.sh b/build.sh index 7c0c8ce..93c0f7e 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -docker build --tag schuellerf/geneweb:latest --tag schuellerf/geneweb:1.0 . +docker build --tag wollud1969/geneweb5:latest --tag wollud1969/geneweb5:1.0 . diff --git a/scripts/README-SETUP.txt b/scripts/README-SETUP.txt new file mode 100644 index 0000000..8429fb8 --- /dev/null +++ b/scripts/README-SETUP.txt @@ -0,0 +1,2 @@ +cd /genewebData +/opt/geneweb/gw/ged2gwb -f /mnt/nober.ged -o nober > comm.log diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 85db8be..bbef22d 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -1,9 +1,5 @@ #!/usr/bin/env bash -# no database found - we need the setup -if [ $(ls ${GENEWEBDB}/*.gwb 2>/dev/null|wc -l) -eq 0 ]; then - /start_setup.sh & -fi -/usr/bin/gwd -lang${LANGUAGE} -hd${GENEWEBSHARE} -dd${GENEWEBDOC} -bd${GENEWEBDB} -p${PORT} +/opt/geneweb/gw/gwd -lang${LANGUAGE} -hd${GENEWEBSHARE} -bd${GENEWEBDB} -p${PORT} diff --git a/scripts/start_setup.sh b/scripts/start_setup.sh deleted file mode 100755 index 40ed641..0000000 --- a/scripts/start_setup.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -pushd ${GENEWEBDB} - if [ -n "${HOST_IP}" ]; then - echo "${HOST_IP}" > /setup_ips.txt - fi - gwsetup -p${SETUP_PORT} -gd${GENEWEBSHARE} -lang${LANGUAGE} -log${SETUP_LOGFILE} -only/setup_ips.txt -popd diff --git a/start.sh b/start.sh deleted file mode 100755 index 7224519..0000000 --- a/start.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash - - -mkdir -p ${HOME}/GenealogyData -docker rm docker-geneweb 2>/dev/null -docker run -d --name docker-geneweb -p2316:2316 -p2317:2317 -v ${HOME}/GenealogyData:/genewebData schuellerf/geneweb:latest diff --git a/stop.sh b/stop.sh deleted file mode 100755 index df78d60..0000000 --- a/stop.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -docker stop docker-geneweb -docker rm docker-geneweb