Initial Commit
This commit is contained in:
parent
5877ae165c
commit
08544eae6b
51
Dockerfile
Normal file
51
Dockerfile
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
FROM ubuntu:16.04
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
# 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 ${LANGUAGE}
|
||||||
|
|
||||||
|
EXPOSE ${PORT}
|
||||||
|
EXPOSE ${SETUP_PORT}
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get -y install --no-install-recommends gwsetup geneweb && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
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"]
|
47
README.md
47
README.md
@ -1,2 +1,49 @@
|
|||||||
# docker-geneweb
|
# docker-geneweb
|
||||||
Dockerized installation of 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]
|
||||||
|
|
||||||
|
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] 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]
|
||||||
|
## 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 (see above)
|
||||||
|
|
||||||
|
5
build.sh
Executable file
5
build.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
docker build --tag docker-geneweb:latest --tag docker-geneweb:1.0 .
|
||||||
|
|
||||||
|
|
9
scripts/bootstrap.sh
Executable file
9
scripts/bootstrap.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/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}
|
5
scripts/start_setup.sh
Executable file
5
scripts/start_setup.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
pushd ${GENEWEBDB}
|
||||||
|
gwsetup -p ${SETUP_PORT} -gd ${GENEWEBSHARE} -lang ${LANGUAGE} -only /setup_ips.txt -log ${SETUP_LOGFILE} &
|
||||||
|
popd
|
6
start.sh
Executable file
6
start.sh
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/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
|
Loading…
x
Reference in New Issue
Block a user