Web based family history software

Question Command line configuration

More
3 years 7 months ago - 3 years 7 months ago #1 by georg
Command line configuration was created by georg
I am totally prepared for a flat no here, but just in case ...

Is it possible to initialise webtrees from the command line? Most importantly I would like to set up the empty database, but loading a GEDCOM file in batch would also be useful.

The use case is this: I don't have a permanent installation, but run webtrees periodically on different boxen, and the more I can reduce the manual steps in a new container, the better.

Yes, I know that it is possible to make a DB dump and copy config files from a fresh installation, but a command line script is more likely to survive the next upgrade. (I have used that solution in the past.)
Last edit: 3 years 7 months ago by georg.

Please Log in or Create an account to join the conversation.

  • bertkoor
  • Offline
  • Platinum Member
  • Platinum Member
  • Greetings from Utrecht, Holland
More
3 years 7 months ago - 3 years 7 months ago #2 by bertkoor
Replied by bertkoor on topic Command line configuration
You say container. Docker??

It's possible to violate the rule of "one responsibility per container" and put everything (php scripts, sql db) in one. Publish on the cloud (DockerHub) and you can retrieve it later for a quick fresh start.

Making a CLI or script for gedcom import is probably more hassle than worth it.

stamboom.BertKoor.nl runs on webtrees v1.7.13
Last edit: 3 years 7 months ago by bertkoor.

Please Log in or Create an account to join the conversation.

  • bertkoor
  • Offline
  • Platinum Member
  • Platinum Member
  • Greetings from Utrecht, Holland
More
3 years 7 months ago #3 by bertkoor
Replied by bertkoor on topic Command line configuration
Come to think of it, there is though an important reason not to: security.

Once the word gets out certain webtrees installations based on your Docker image have fixed and known passwords for the DB and admin accounts, wait for abuse to happen.
Imagine one command is all it takes to fill a database with a zillion records. That is a DDOS attack.

Better keep some manual intervention there and servers safe.

stamboom.BertKoor.nl runs on webtrees v1.7.13

Please Log in or Create an account to join the conversation.

More
3 years 7 months ago #4 by georg
Replied by georg on topic Command line configuration
Docker, yes. Sorry, I meant to write.

How does putting all in one container help me here? The DB has to be initialised.

Please Log in or Create an account to join the conversation.

More
3 years 7 months ago - 3 years 7 months ago #5 by georg
Replied by georg on topic Command line configuration

bertkoor wrote: Once the word gets out certain webtrees installations based on your Docker image have fixed and known passwords for the DB and admin accounts, wait for abuse to happen.


That's only a concern when it is run on an open network, which is rarely my case. When it is the case, the admin password has to be changed, but that should suffice as manual step. The DB should not be exposed by docker at all, being available only on an internal docker network.

Anyway, if it can be managed on DockerHub, I am sure I can make it work with a local image dump if not with the Dockerfile script.
Last edit: 3 years 7 months ago by georg.

Please Log in or Create an account to join the conversation.

More
3 years 7 months ago #6 by fisharebest
Replied by fisharebest on topic Command line configuration
See the section on "third party installers" in webtrees.net/install/

This includes a docker installation.

Basically, your setup script needs to mimic the functions of the built-in setup script. i.e. it must

1) create the file /data/config.ini.php
2) create the database with an admin user (e.g. import an SQL dump file).

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
3 years 7 months ago #7 by georg
Replied by georg on topic Command line configuration

fisharebest wrote: 2) create the database with an admin user (e.g. import an SQL dump file).


Right. That was what I was hoping to avoid. Anyway, thanks a lot for the clarification.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
}