Docker Container
-
- Posts: 9
- Joined: Thu 09 Jan 2020, 14:24
Docker Container
Hi,
I've been using this website on-and-off for a few years, since my father passed away and left his ancient Family Tree Maker database to me.
I've been bundling up the application as a docker container for a few years, and I'd love to contribute some knowledge to the development team - perhaps looking at some sort of pipeline to automatically release new images?
I'm happy to help, if you're not already using some sort of version control software - like git (perhaps the team hosts it's own, or you use Sourceforge?), and once you're using something like that, I'd be happy to work with you to create a post-release commit that produces a set of docker containers.
Does this sound of interest to the core team?
Regards,
Jon "The Nice Guy" Spriggs
https://jon.sprig.gs
I've been using this website on-and-off for a few years, since my father passed away and left his ancient Family Tree Maker database to me.
I've been bundling up the application as a docker container for a few years, and I'd love to contribute some knowledge to the development team - perhaps looking at some sort of pipeline to automatically release new images?
I'm happy to help, if you're not already using some sort of version control software - like git (perhaps the team hosts it's own, or you use Sourceforge?), and once you're using something like that, I'd be happy to work with you to create a post-release commit that produces a set of docker containers.
Does this sound of interest to the core team?
Regards,
Jon "The Nice Guy" Spriggs
https://jon.sprig.gs
- Huub
- HuMo-genealogy programmer
- Posts: 2693
- Joined: Wed 27 Aug 2008, 11:34
- Location: Heerhugowaard, Netherlands
- Contact:
Re: Docker Container
Hi Jon!
At this moment I'm using Xampp to test the scripts at my laptop.
Sometimes I do some testing in Docker using a Raspberry Pi 4. Mostly to do some tests with more recent PHP versions.
To release a new version:
- First I check the language updates: https://www.transifex.com/humo-gen/humo-gen/dashboard/
- Then release the new version at the humo-gen.com website (this version will be downloaded if you do an automatic update).
- Then upload the new version at: https://sourceforge.net/projects/humo-gen/
- Then start up my Raspberry Pi 4 server, and use git to upload the new version at: https://github.com/HuubMons/HuMo-genealogy
Pfff...
I allready tried to connect the Sourceforge and Github websites (a few weeks ago). But that wasn't successful. A new project was made at the Sourceforge website, I didn't want that...
Also update social media (not always...):
- https://www.facebook.com/groups/humogen/
- mailing using mailchimp
Docker:
I allready tried: https://github.com/jared-bloomer/docker-HuMo-gen
https://hub.docker.com/r/jbloomer52/humogen
But this docker file didn't work at my Raspberry Pi (ARM architecture needed).
So now I'm just using Nginx, PHP, MariaDb and PHPMyAdmin docker files.
If anything can be improved to release a new version I would be quit happy
At this moment I'm using Xampp to test the scripts at my laptop.
Sometimes I do some testing in Docker using a Raspberry Pi 4. Mostly to do some tests with more recent PHP versions.
To release a new version:
- First I check the language updates: https://www.transifex.com/humo-gen/humo-gen/dashboard/
- Then release the new version at the humo-gen.com website (this version will be downloaded if you do an automatic update).
- Then upload the new version at: https://sourceforge.net/projects/humo-gen/
- Then start up my Raspberry Pi 4 server, and use git to upload the new version at: https://github.com/HuubMons/HuMo-genealogy
Pfff...
I allready tried to connect the Sourceforge and Github websites (a few weeks ago). But that wasn't successful. A new project was made at the Sourceforge website, I didn't want that...
Also update social media (not always...):
- https://www.facebook.com/groups/humogen/
- mailing using mailchimp
Docker:
I allready tried: https://github.com/jared-bloomer/docker-HuMo-gen
https://hub.docker.com/r/jbloomer52/humogen
But this docker file didn't work at my Raspberry Pi (ARM architecture needed).
So now I'm just using Nginx, PHP, MariaDb and PHPMyAdmin docker files.
If anything can be improved to release a new version I would be quit happy
HuMo-genealogy update? Backup your database! Editing in HuMo-genealogy? Backup your data!
Make multiple backups with: PHPMyAdmin, gedcom export and database export.
HuMo-genealogy software: http://humo-gen.com
Make multiple backups with: PHPMyAdmin, gedcom export and database export.
HuMo-genealogy software: http://humo-gen.com
-
- Posts: 9
- Joined: Thu 09 Jan 2020, 14:24
Re: Docker Container
Oh my word, I completely missed this!
OK, I'll take a look over the festive break and see if I can put something together! If you're already using Github then I can look into trying to create some docker automation over there
For context, here's what I'm doing today: https://gist.github.com/JonTheNiceGuy/e ... c25f3253d5
OK, I'll take a look over the festive break and see if I can put something together! If you're already using Github then I can look into trying to create some docker automation over there
For context, here's what I'm doing today: https://gist.github.com/JonTheNiceGuy/e ... c25f3253d5
-
- Posts: 9
- Joined: Thu 09 Jan 2020, 14:24
Re: Docker Container
I've just submitted a pull request to support passing environment variables, and to add a simple docker-compose file over the top, with supporting Dockerfiles. Using the latest tags for mysql, php-fpm and nginx means you'll now get arm64 support, so you can test with your Raspberry Pi 4 as well as any x64 Docker environments you may have access to.
I've not yet looked at publishing this into Docker Hub, I wanted to make sure this was acceptable first.
I've not yet looked at publishing this into Docker Hub, I wanted to make sure this was acceptable first.
- Huub
- HuMo-genealogy programmer
- Posts: 2693
- Joined: Wed 27 Aug 2008, 11:34
- Location: Heerhugowaard, Netherlands
- Contact:
Re: Docker Container
I'm almost ready to release a new version, but I absolutely want to try to add these docker files!I've not yet looked at publishing this into Docker Hub, I wanted to make sure this was acceptable first.
At this moment I see one small problem: the db_login file is changed when an update is done. The login variables will be overwritten.
This is done in file admin/update/install_update.php (line 355 etc). Old login variables are stored into a new db_login file.
But: the db_login file is changed now, I will change this update script!
HuMo-genealogy update? Backup your database! Editing in HuMo-genealogy? Backup your data!
Make multiple backups with: PHPMyAdmin, gedcom export and database export.
HuMo-genealogy software: http://humo-gen.com
Make multiple backups with: PHPMyAdmin, gedcom export and database export.
HuMo-genealogy software: http://humo-gen.com
-
- Posts: 9
- Joined: Thu 09 Jan 2020, 14:24
Re: Docker Container
Looking at your list of activities you do each release - would something like a combination of this be of help?
- Releasing files for multiple operating systems with Github Actions in 2021 (ok, ok, just a single OS - but it's the *basis* for the idea)
- SCP for GitHub Actions (via How to copy files to sourceforge in non-interactive request for password?)
- semantic-release plugin to generate changelog content with conventional-changelog
- Huub
- HuMo-genealogy programmer
- Posts: 2693
- Joined: Wed 27 Aug 2008, 11:34
- Location: Heerhugowaard, Netherlands
- Contact:
Re: Docker Container
Thanks for these links! These could help to improve the release of HuMo-genealogy!
At this moment I'm testing the Docker container files.
1) I had to change the db_login file. If variables are used instead of constants, the automatic update script isn't working anymore (I tried changing this update script, but it wasn't succesful). 2) I tested the Container, at this moment it's not working yet.
- I build the container using build -t humo-genealogy /humo-genealogy/Docker/fpm. Is the last part correct?
- The build is about 320 MB.
- I created an image, and a container. The container has status: "Running".
- The link http://192.168.x.x:9090/ has result: connection refused (actually in dutch, it's something like this).
Container log:
[07-Dec-2022 17:34:16] NOTICE: fpm is running, pid 1
[07-Dec-2022 17:34:16] NOTICE: ready to handle connections
I suspect the build isn't done properly. Maybe Docker/nginx/Dockerfile must be added some way?
[Update] Maybe I need the docker build x command to process the docker compose-file.yml... Now find the proper syntax...
At this moment I'm testing the Docker container files.
1) I had to change the db_login file. If variables are used instead of constants, the automatic update script isn't working anymore (I tried changing this update script, but it wasn't succesful). 2) I tested the Container, at this moment it's not working yet.
- I build the container using build -t humo-genealogy /humo-genealogy/Docker/fpm. Is the last part correct?
- The build is about 320 MB.
- I created an image, and a container. The container has status: "Running".
- The link http://192.168.x.x:9090/ has result: connection refused (actually in dutch, it's something like this).
Container log:
[07-Dec-2022 17:34:16] NOTICE: fpm is running, pid 1
[07-Dec-2022 17:34:16] NOTICE: ready to handle connections
I suspect the build isn't done properly. Maybe Docker/nginx/Dockerfile must be added some way?
[Update] Maybe I need the docker build x command to process the docker compose-file.yml... Now find the proper syntax...
HuMo-genealogy update? Backup your database! Editing in HuMo-genealogy? Backup your data!
Make multiple backups with: PHPMyAdmin, gedcom export and database export.
HuMo-genealogy software: http://humo-gen.com
Make multiple backups with: PHPMyAdmin, gedcom export and database export.
HuMo-genealogy software: http://humo-gen.com
-
- Posts: 9
- Joined: Thu 09 Jan 2020, 14:24
Re: Docker Container
On phone... Hopefully this will be enough detail
Any time your php content changes, use
If you get an error because docker-compose doesn't work, you'll need to install docker-compose-plugin using your package manager, or docker-compose from pip.
Regarding the update script... I'll take a look when I'm not on my phone
Code: Select all
docker-compose up -d
Code: Select all
docker-compose up -d --build
Regarding the update script... I'll take a look when I'm not on my phone
- Huub
- HuMo-genealogy programmer
- Posts: 2693
- Joined: Wed 27 Aug 2008, 11:34
- Location: Heerhugowaard, Netherlands
- Contact:
Re: Docker Container
At this moment the update script is solved. I allready changed the db_login file (probably not the best method to solve this, but for now it's working).
I did the docker-compose command:
Maybe MySQL must be replaced by MariaDB? I will try that...
Update, I have changed the Mysql into MariaDb in docker-compose file (no error message anymore):
At this moment I do see the HuMo-genealogy admin page. Installation of HuMo-genealogy tables failes at this moment. Probably because of hostname isn't properly added in db_login file. Trying to solve this...
I did the docker-compose command:
Code: Select all
Creating network "docker_default" with the default driver
Pulling db (mysql:latest)...
latest: Pulling from library/mysql
ERROR: no matching manifest for linux/arm/v7 in the manifest list entries
Update, I have changed the Mysql into MariaDb in docker-compose file (no error message anymore):
Code: Select all
mariadb:
image: linuxserver/mariadb:latest
restart: always
volumes:
- .mysql:/config/databases
env_file:
- .env
environment:
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
ports:
- 3306:3306
HuMo-genealogy update? Backup your database! Editing in HuMo-genealogy? Backup your data!
Make multiple backups with: PHPMyAdmin, gedcom export and database export.
HuMo-genealogy software: http://humo-gen.com
Make multiple backups with: PHPMyAdmin, gedcom export and database export.
HuMo-genealogy software: http://humo-gen.com
- Huub
- HuMo-genealogy programmer
- Posts: 2693
- Joined: Wed 27 Aug 2008, 11:34
- Location: Heerhugowaard, Netherlands
- Contact:
Re: Docker Container
Pfew, it works!
For now I'm using in docker-compose:
I will try later to use the env variables instead of USER/PASSWORD variables.
In db_login.php I added the line for Docker: $DATABASE_HOST='mariadb';
I'm not sure if this will work in all Docker installations.
Now I'm finishing my new HuMo-genealogy release (including these files). I'm convinced improvements can be made, but it's a start for now.
Possible improvements for future versions:
I checked GEDCOM file import: the GEDCOM files will disappear if the container is restarted.
I haven't checked showing of pictures. Probably set a path to picture folder. Also needed for CMS pictures.
For now I'm using in docker-compose:
Code: Select all
mariadb:
image: linuxserver/mariadb:latest
container_name:
mariadb_humo
restart: always
volumes:
- .mysql:/config/databases
#env_file:
# - .env
environment:
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
TZ: Europe/Amsterdam
MYSQL_DATABASE: humo-gen
MYSQL_USER: humo-gen
MYSQL_PASSWORD: humo-gen
PUID: 1000
PGID: 1000
ports:
- 3306:3306
In db_login.php I added the line for Docker: $DATABASE_HOST='mariadb';
I'm not sure if this will work in all Docker installations.
Now I'm finishing my new HuMo-genealogy release (including these files). I'm convinced improvements can be made, but it's a start for now.
Possible improvements for future versions:
I checked GEDCOM file import: the GEDCOM files will disappear if the container is restarted.
I haven't checked showing of pictures. Probably set a path to picture folder. Also needed for CMS pictures.
HuMo-genealogy update? Backup your database! Editing in HuMo-genealogy? Backup your data!
Make multiple backups with: PHPMyAdmin, gedcom export and database export.
HuMo-genealogy software: http://humo-gen.com
Make multiple backups with: PHPMyAdmin, gedcom export and database export.
HuMo-genealogy software: http://humo-gen.com