https://en.wikibooks.org/wiki/GNU_Health
https://www.gnuhealth.org/download.html
The container set for the docker-compose.yml
uses a build process from ./build
Create the images using:
docker-compose build
docker-compose pull
The build process uses the slim version of the python Docker image. It adds in the necessary components to run the gnuhealth-setup
script - which takes care of the the remainder of the install.
By mounting the config file trytond.conf
into the image we are able to set the necessary credentials for the service to access the db
container.
Create a file .password
owned/accessible by uid 1000 that contains the password for the admin user, eg.
echo SecretKey > .password
sudo chown 1000:1000 .password
The build process mimics the install instructions.
Bring up the container set and watch the logs.
docker-compose up -d && docker-compose logs -f
Initialise the database and admin user using:
docker-compose exec gnuhealth bash -c /home/gnuhealth/init.sh
By default this listens on TCP port 8000 for web and 8080 for webdav, according to the config file. I have exposed both ports and these are able to be mapped to using the $PORTBASE
variable - by default I've set the it to 80
which maps the ports to the same as the container (8000 and 8080). This can be easily changes to anything within the TCP port range by setting the portbase, eg.
PORTBASE=123
Would result in the container being accessed via port 12300 and 12380 respectively.
This is a PostgreSQL v12 instance using the official postgres:12-alpine
container.
The init-db.sh
script creates the gnuhealth
user/role sets the password and creates the gnuhealth
database - owned by the new user.
Install and run the client.
pip3 install --user --upgrade gnuhealth-client
gnuhealth-client
Connect using the server name and port you specified (eg. server:12300
) with the user admin
and the password you put in the .password
file.