Compare commits

...

10 Commits

Author SHA1 Message Date
3955a2a631 better way for checksum test 2018-12-12 20:57:35 +01:00
59557e4a2f verify checksum 2018-12-12 20:46:11 +01:00
1915fb09d6 run db on unprivileged uid 2018-12-12 19:49:09 +01:00
06dd167563 adjustings after fork 2018-12-12 17:23:49 +01:00
Florian Schüller
19b4cac4c5 Fixes #2 2016-12-24 08:56:03 +01:00
Florian Schüller
ac4b894f2c Fixes #1 2016-12-22 15:45:26 +01:00
Florian Schüller
c6a8fd3f81 Added hyperlink to Wikipedia 2016-12-17 12:29:17 +01:00
Florian Schüller
d279a27700 removed hint - obsolete 2016-11-06 14:14:38 +01:00
Florian Schüller
276a6e4ec2 removed hint - obsolete 2016-11-06 14:12:33 +01:00
Florian Schüller
fe78f8fd0b changed naming to be dockerhub compatible 2016-11-06 13:43:41 +01:00
9 changed files with 35 additions and 104 deletions

View File

@@ -1,51 +1,53 @@
FROM ubuntu:16.04
FROM i386/debian:wheezy
MAINTAINER Wolfgang Hottgenroth <wolfgang.hottgenroth@icloud.com>
ARG GENEWEB_UID="2317"
ARG GENEWEB_GID="2317"
MAINTAINER Florian Schüller <florian.schueller@gmail.com>
# 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 \
echo "75f55ac1d0aca82faee57a617bbced26 gw-5.02-linux.tar" > /tmp/gw-chksum
RUN \
cd /tmp && wget --no-check-certificate https://github.com/geneweb/geneweb/releases/download/v5.02/gw-5.02-linux.tar && \
md5sum --check gw-chksum && \
tar -xf gw-5.02-linux.tar && \
cd /opt && mkdir geneweb && \
mv /tmp/distribution/* /opt/geneweb && \
groupadd -r -g $GENEWEB_GID geneweb && \
useradd -r -u $GENEWEB_UID -g geneweb geneweb && \
chown -R geneweb:geneweb /opt/geneweb && \
mkdir $GENEWEBDB && \
chown geneweb:geneweb $GENEWEBDB
# 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
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
USER geneweb
CMD ["/bootstrap.sh"]

View File

@@ -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

View File

@@ -1,54 +0,0 @@
# docker-geneweb
Dockerized installation of Geneweb
The container does not include `gwsetup` by default but this is only installed once to create a database
*hint:* `gwsetup` is the program to create a genealogy database initially
## 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 docker-geneweb -p2316:2316 -p2317:2317 -v ${HOME}/GenealogyData:/genewebData docker-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
**Please be patient** the setup tool will be installed "on the fly" only upon the *first start* if you don't have any genealogy database.
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 docker-geneweb /start_setup.sh
```
and then navigate to [http://localhost:2316](http://localhost:2316)
## Shutdown
To shutdown the container just run
```
docker stop docker-geneweb
docker rm docker-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 docker-geneweb /start_setup.sh
```
and then navigate to [http://localhost:2316](http://localhost:2316)

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
docker build --tag docker-geneweb:latest --tag docker-geneweb:1.0 .
docker build --tag wollud1969/geneweb5:latest --tag wollud1969/geneweb5:1.0 .

2
scripts/README-SETUP.txt Normal file
View File

@@ -0,0 +1,2 @@
cd /genewebData
/opt/geneweb/gw/ged2gwb -f /mnt/nober.ged -o nober > comm.log

View File

@@ -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}

View File

@@ -1,5 +0,0 @@
#!/usr/bin/env bash
pushd ${GENEWEBDB}
gwsetup -p${SETUP_PORT} -gd${GENEWEBSHARE} -lang${LANGUAGE} -log${SETUP_LOGFILE} -only/setup_ips.txt
popd

View File

@@ -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 docker-geneweb:latest

View File

@@ -1,4 +0,0 @@
#!/usr/bin/env bash
docker stop docker-geneweb
docker rm docker-geneweb