GithubHelp home page GithubHelp logo

mbehrle / docker-gnuhealth-demo Goto Github PK

View Code? Open in Web Editor NEW
16.0 6.0 16.0 27 KB

Debian based docker images providing a GNUHealth demo (debian.tryton.org)

License: Other

Shell 42.65% Dockerfile 57.35%

docker-gnuhealth-demo's Introduction

Please do not use any more this setup, it is currently not mantained.

Docker Setup for GNUHealth Demoserver

This Docker Setup provides a quick and easy way to get a GNU Health demo server up and running with only a few steps. Furthermore this docker setup may be used as a base to create your own docker based environment for production use.

This build is based on the official docker images

using packages from Debian Tryton Maintainers and providing the images

and using

for the definition of the application setup and spin up of the test environment.

The images are automatically built from GitHub.

Installation

Prerequisites

You need a running docker server and curl for downloading some files. On a Debian based system this means running

sudo apt-get install docker.io curl

Add the user that will use docker (i.e. yourself) to the docker group

sudo useradd myuser docker

Note: You may have to relogin before the group settings will take effect.

Get docker-compose on a recent Debian system with

sudo apt-get install docker-compose

or install docker-compose refering to the installation page e.g.

curl -L https://github.com/docker/compose/releases/download/1.1.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

Usage

Create a working directory

mkdir ~/gnuhealth
cd gnuhealth

Fetch the definition file

curl -o ./docker-compose.yml https://raw.githubusercontent.com/mbehrle/docker-gnuhealth-demo/master/docker-compose.yml

Run

docker-compose up

and get yourself a cup of coffee...

The first setup will take some time for

  • downloading the images
  • importing the GNU Health Demo database

Subsequent calls to docker-compose up will run much faster. Stop the servers with Ctrl+C.

As soon as the servers have started up you can connect with the Tryton client using the credentials as described in the GNU Health documentation with the only difference that you put in your own machine as the server (localhost, if you are running the client on the same machine)

Server: <your_machine>:8000
Database: health30
User name: admin
Password: gnusolidario

Note: The version of the Tryton client must match the version of the server (3.8.x). A suitable client can be installed from distribution packages of your distribution or from the Tryton download site for OS X or Windows binaries.

For Debian systems please refer to packages from debian.tryton.org for the procedures to install the correct version.

Building and running from source

Todo

Authors and Credits

This setup was made by MBSolutions in the hope, that it may be useful for the GNU Health users. Thanks to the GNU Health project for providing this free Health and Hospital Information System.

Parts of this setup were adopted from

Support

For any questions about this image and docker setup you may contact us at support.

docker-gnuhealth-demo's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

docker-gnuhealth-demo's Issues

package location error

Command terminal output below:

apt-get install docker.io curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package docker.io is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Error executing http://localhost:8000

Dear,

When trying to access the system through the browser, the error occurs:

Error response
Error code 404.

Message: File not found.

Error code explanation: 404 = Nothing matches the given URI.

Connection error

Hello I'm using Arch Linux. Mi tryton client version is 3.4.8. I'm using the tutorial connect data:

Host: 127.0.0.1:8000
Database: health28
User name: admin
Password: gnusolidario

But I'm unable to connect to the server.

[root@laptop gnuhealth]# docker-compose up
Starting gnuhealth_db_1
Starting gnuhealth_tryton_1
Attaching to gnuhealth_db_1, gnuhealth_tryton_1
db_1     | LOG:  database system was shut down at 2016-03-11 16:28:15 UTC
tryton_1 | [Fri Mar 11 16:28:19 2016] INFO:trytond.server:using /etc/tryton/trytond.conf as configuration file
tryton_1 | [Fri Mar 11 16:28:19 2016] INFO:trytond.server:initialising distributed objects services
db_1     | LOG:  MultiXact member wraparound protections are now enabled
db_1     | LOG:  database system is ready to accept connections
db_1     | LOG:  autovacuum launcher started
tryton_1 | [Fri Mar 11 16:28:19 2016] INFO:trytond.server:starting JSON-RPC protocol on :::8000
tryton_1 | [Fri Mar 11 16:28:27 2016] INFO:database:connect to "health28"
tryton_1 | [Fri Mar 11 16:28:38 2016] INFO:database:connect to "health28"
tryton_1 | [Fri Mar 11 16:28:48 2016] INFO:database:connect to "health28"

The first time I was using the wrong tryton client version (3.8). But now I'm using the correct version according to the server (3.4.8) and I'm getting a logging error.

Connection error!
Bad username or password!

This is the docker install log:

[root@laptop gnuhealth]# docker-compose up
Pulling db (mbsolutions/postgres-gnuhealth:2.8)...
2.8: Pulling from mbsolutions/postgres-gnuhealth
f8efbffe7b95: Pull complete
a3ed95caeb02: Pull complete
64bb2775d20d: Pull complete
112aae0540bb: Pull complete
96d2a7a4fcb3: Pull complete
8d43a1a2d52b: Pull complete
1eba7ded6f54: Pull complete
72377f1d0630: Pull complete
5b95ba5f224f: Pull complete
b91c5ed5aea8: Pull complete
1c9d3fc5a296: Pull complete
793d7d756766: Pull complete
9cd28ddb9d7e: Pull complete
c5047e1e2cb6: Pull complete
Digest: sha256:5651dd9c0984b201d22b6607ff1d782c04c4549c9ebb553d4004bf5ac518618d
Status: Downloaded newer image for mbsolutions/postgres-gnuhealth:2.8
Creating gnuhealth_db_1
Pulling tryton (mbsolutions/tryton-server-gnuhealth:3.4)...
3.4: Pulling from mbsolutions/tryton-server-gnuhealth
237d5fcd25cf: Pull complete
a3ed95caeb02: Pull complete
a0786d63385a: Pull complete
d895343f2b4c: Pull complete
a9d6577b36bd: Pull complete
28733ddfe9f8: Pull complete
f7be68864363: Pull complete
f2c00534caf3: Pull complete
b6a203dcd5b3: Pull complete
Digest: sha256:ff6c119c69ab31324799d84495bb25e0d48b84ff4f34e5f074b75f7f7512382a
Status: Downloaded newer image for mbsolutions/tryton-server-gnuhealth:3.4
Creating gnuhealth_tryton_1
Attaching to gnuhealth_db_1, gnuhealth_tryton_1
db_1     | The files belonging to this database system will be owned by user "postgres".
db_1     | This user must also own the server process.
db_1     | 
db_1     | The database cluster will be initialized with locale "en_US.utf8".
db_1     | The default database encoding has accordingly been set to "UTF8".
db_1     | The default text search configuration will be set to "english".
db_1     | 
db_1     | Data page checksums are disabled.
db_1     | 
db_1     | fixing permissions on existing directory /var/lib/postgresql/data ... ok
db_1     | creating subdirectories ... ok
db_1     | selecting default max_connections ... 100
db_1     | selecting default shared_buffers ... 128MB
db_1     | selecting dynamic shared memory implementation ... posix
db_1     | creating configuration files ... ok
db_1     | creating template1 database in /var/lib/postgresql/data/base/1 ... ok
db_1     | initializing pg_authid ... ok
db_1     | initializing dependencies ... ok
db_1     | creating system views ... ok
db_1     | loading system objects' descriptions ... ok
db_1     | creating collations ... ok
db_1     | creating conversions ... ok
db_1     | creating dictionaries ... ok
db_1     | setting privileges on built-in objects ... ok
db_1     | creating information schema ... ok
db_1     | loading PL/pgSQL server-side language ... ok
db_1     | vacuuming database template1 ... ok
db_1     | copying template1 to template0 ... ok
db_1     | copying template1 to postgres ... ok
db_1     | syncing data to disk ... ok
db_1     | 
db_1     | Success. You can now start the database server using:
db_1     | 
db_1     |     postgres -D /var/lib/postgresql/data
db_1     | or
db_1     |     pg_ctl -D /var/lib/postgresql/data -l logfile start
db_1     | 
db_1     | 
db_1     | WARNING: enabling "trust" authentication for local connections
db_1     | You can change this by editing pg_hba.conf or using the option -A, or
db_1     | --auth-local and --auth-host, the next time you run initdb.
db_1     | waiting for server to start....LOG:  database system was shut down at 2016-03-11 15:25:10 UTC
db_1     | LOG:  MultiXact member wraparound protections are now enabled
db_1     | LOG:  autovacuum launcher started
db_1     | LOG:  database system is ready to accept connections
db_1     |  done
db_1     | server started
db_1     | ALTER ROLE
db_1     | 
db_1     | 
db_1     | /docker-entrypoint.sh: running /docker-entrypoint-initdb.d/gnuhealth.sh
db_1     | FATAL:  lock file "postmaster.pid" already exists
db_1     | HINT:  Is another postmaster (PID 60) running in data directory "/var/lib/postgresql/data"?
gnuhealth_db_1 exited with code 1
tryton_1 | [Fri Mar 11 15:38:07 2016] INFO:trytond.server:using /etc/tryton/trytond.conf as configuration file
tryton_1 | [Fri Mar 11 15:38:07 2016] INFO:trytond.server:initialising distributed objects services
tryton_1 | [Fri Mar 11 15:38:07 2016] INFO:trytond.server:starting JSON-RPC protocol on :::8000
tryton_1 | ::ffff:172.17.0.1 - - [11/Mar/2016 15:41:53] code 400, message Bad request syntax ('\x16\x03\x01\x02\x00\x01\x00\x01\xfc\x03\x03z\x89\xd4\xc9\x0f\x12\xdc\xab\x7f\xdc\xf6\xa1\xbc$\x84\x018\x8d\xddA\x99\xd3\x85Ign\x02\x9c\xf2\xac/\x88\x00\x00\x94\xc00\xc0,\xc02\xc0.\xc0/\xc0+\xc01\xc0-\x00\xa5\x00\xa3\x00\xa1\x00\x9f\x00\xa4\x00\xa2\x00\xa0\x00\x9e\xc0(\xc0$\xc0\x14\xc0')

^CGracefully stopping... (press Ctrl+C again to force)
Stopping gnuhealth_tryton_1 ... done

Latest version

It would be great if you can use the latest version of GNU Health. Have you planned to update it ?

Connection error on GNU Health on Docker

I've been following the instructions on "Option 4: Run GNU Health from Docker (Lightweight Containers)" at https://en.wikibooks.org/wiki/GNU_Health/Different_ways_to_test_GNU_Health#Option_4:_Run_GNU_Health_from_Docker_.28Lightweight_Containers.29 on an Ubuntu 14.04 laptop.

When I try to login from Tryton, I'm getting a message:
"Connection error! Bad username or password"

This is with ...
Host: 127.0.01:8000
Database: health28
User name: admin
Password: gnusolidario

Any suggestions? Here's the transcript from the terminal:

-- begin paste --
$ docker-compose up
Starting gnuhealth_db_1...
Starting gnuhealth_tryton_1...
Attaching to gnuhealth_db_1, gnuhealth_tryton_1
tryton_1 | [Tue Aug 18 01:48:35 2015] INFO:trytond.server:using /etc/tryton/trytond.conf as configuration file
tryton_1 | [Tue Aug 18 01:48:35 2015] INFO:trytond.server:initialising distributed objects services
tryton_1 | [Tue Aug 18 01:48:35 2015] INFO:trytond.server:starting JSON-RPC protocol on :::8000
tryton_1 | [Tue Aug 18 14:17:19 2015] INFO:server:stopped
tryton_1 | [Tue Aug 18 14:17:31 2015] INFO:trytond.server:using /etc/tryton/trytond.conf as configuration file
tryton_1 | [Tue Aug 18 14:17:31 2015] INFO:trytond.server:initialising distributed objects services
tryton_1 | [Tue Aug 18 14:17:31 2015] INFO:trytond.server:starting JSON-RPC protocol on :::8000
tryton_1 | [Tue Aug 18 14:17:59 2015] INFO:server:stopped
tryton_1 | [Tue Aug 18 14:31:57 2015] INFO:trytond.server:using /etc/tryton/trytond.conf as configuration file
tryton_1 | [Tue Aug 18 14:31:57 2015] INFO:trytond.server:initialising distributed objects services
tryton_1 | [Tue Aug 18 14:31:58 2015] INFO:trytond.server:starting JSON-RPC protocol on :::8000
tryton_1 | ::ffff:172.17.42.1 - - [18/Aug/2015 14:54:14] code 400, message Bad request syntax ('\x16\x03\x01\x02\x00\x01\x00\x01\xfc\x03\x03=\xb5\xf8S\xe3z:d.s\x9c\x02\xb3\xa7\xf7\xac_-\x83g\x02\x8d\x0e\x8bx\x8f\xad\xfc\x96P\x14\x00\x00\x8e\xc00\xc0,\xc0(\xc0$\xc0\x14\xc0')
tryton_1 | [Tue Aug 18 14:54:14 2015] INFO:database:connect to "heallth28"
tryton_1 | [Tue Aug 18 14:54:27 2015] INFO:database:connect to "heallth28"
tryton_1 | [Tue Aug 18 15:15:29 2015] INFO:database:connect to "health28"
tryton_1 | [Tue Aug 18 15:16:37 2015] INFO:database:connect to "health28"
tryton_1 | [Tue Aug 18 15:34:58 2015] INFO:server:stopped
tryton_1 | [Tue Aug 18 15:35:02 2015] INFO:trytond.server:using /etc/tryton/trytond.conf as configuration file
tryton_1 | [Tue Aug 18 15:35:02 2015] INFO:trytond.server:initialising distributed objects services
tryton_1 | [Tue Aug 18 15:35:02 2015] INFO:trytond.server:starting JSON-RPC protocol on :::8000
tryton_1 | [Tue Aug 18 15:35:42 2015] INFO:database:connect to "health28"
tryton_1 | [Tue Aug 18 15:42:37 2015] INFO:server:stopped
tryton_1 | [Tue Aug 18 15:42:45 2015] INFO:trytond.server:using /etc/tryton/trytond.conf as configuration file
tryton_1 | [Tue Aug 18 15:42:45 2015] INFO:trytond.server:initialising distributed objects services
tryton_1 | [Tue Aug 18 15:42:45 2015] INFO:trytond.server:starting JSON-RPC protocol on :::8000
tryton_1 | [Tue Aug 18 15:42:56 2015] INFO:server:stopped
db_1 | The files belonging to this database system will be owned by user "postgres".
db_1 | This user must also own the server process.
db_1 |
db_1 | The database cluster will be initialized with locale "en_US.utf8".
db_1 | The default database encoding has accordingly been set to "UTF8".
db_1 | The default text search configuration will be set to "english".
db_1 |
db_1 | Data page checksums are disabled.
db_1 |
db_1 | initdb: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted
db_1 | fixing permissions on existing directory /var/lib/postgresql/data ...
db_1 | The files belonging to this database system will be owned by user "postgres".
db_1 | This user must also own the server process.
db_1 |
db_1 | The database cluster will be initialized with locale "en_US.utf8".
db_1 | The default database encoding has accordingly been set to "UTF8".
db_1 | The default text search configuration will be set to "english".
db_1 |
db_1 | Data page checksums are disabled.
db_1 |
db_1 | initdb: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted
db_1 | fixing permissions on existing directory /var/lib/postgresql/data ...
db_1 | The files belonging to this database system will be owned by user "postgres".
db_1 | This user must also own the server process.
db_1 |
db_1 | The database cluster will be initialized with locale "en_US.utf8".
db_1 | The default database encoding has accordingly been set to "UTF8".
db_1 | The default text search configuration will be set to "english".
db_1 |
db_1 | Data page checksums are disabled.
db_1 |
db_1 | initdb: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted
db_1 | fixing permissions on existing directory /var/lib/postgresql/data ...
db_1 | The files belonging to this database system will be owned by user "postgres".
db_1 | This user must also own the server process.
db_1 |
db_1 | The database cluster will be initialized with locale "en_US.utf8".
db_1 | The default database encoding has accordingly been set to "UTF8".
db_1 | The default text search configuration will be set to "english".
db_1 |
db_1 | Data page checksums are disabled.
db_1 |
db_1 | initdb: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted
db_1 | fixing permissions on existing directory /var/lib/postgresql/data ...
db_1 | The files belonging to this database system will be owned by user "postgres".
db_1 | This user must also own the server process.
db_1 |
db_1 | The database cluster will be initialized with locale "en_US.utf8".
db_1 | The default database encoding has accordingly been set to "UTF8".
db_1 | The default text search configuration will be set to "english".
db_1 |
db_1 | Data page checksums are disabled.
db_1 |
db_1 | initdb: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted
db_1 | fixing permissions on existing directory /var/lib/postgresql/data ...
db_1 | The files belonging to this database system will be owned by user "postgres".
db_1 | This user must also own the server process.
db_1 |
db_1 | The database cluster will be initialized with locale "en_US.utf8".
db_1 | The default database encoding has accordingly been set to "UTF8".
db_1 | The default text search configuration will be set to "english".
db_1 |
db_1 | Data page checksums are disabled.
db_1 |
db_1 | initdb: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted
db_1 | fixing permissions on existing directory /var/lib/postgresql/data ...
db_1 | The files belonging to this database system will be owned by user "postgres".
db_1 | This user must also own the server process.
db_1 |
db_1 | The database cluster will be initialized with locale "en_US.utf8".
db_1 | The default database encoding has accordingly been set to "UTF8".
db_1 | The default text search configuration will be set to "english".
db_1 |
db_1 | Data page checksums are disabled.
db_1 |
db_1 | initdb: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted
db_1 | fixing permissions on existing directory /var/lib/postgresql/data ...
tryton_1 | [Tue Aug 18 15:43:17 2015] INFO:trytond.server:using /etc/tryton/trytond.conf as configuration file
tryton_1 | [Tue Aug 18 15:43:17 2015] INFO:trytond.server:initialising distributed objects services
tryton_1 | [Tue Aug 18 15:43:17 2015] INFO:trytond.server:starting JSON-RPC protocol on :::8000
tryton_1 | [Tue Aug 18 15:43:28 2015] INFO:database:connect to "health28"

-- end paste --

(I had previously reported this problem at http://lists.gnu.org/archive/html/health-dev/2015-08/msg00014.html , and didn't receive a response).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.