Announcement

#1 2015-12-01 18:24:53

Richard Davis
Guest

How to initialize piwigo from command line.

Spent a little time getting piwigo to initialize inside of a docker container and I figured I'd pay it forward.

Assuming that the install directory is `/var/www/piwigo` and that web deamon worker threads will run as `www-data`, piwigo can be initialized as follows:

Code:

cd /var/www/piwigo/ && \
sudo -u www-data \
REMOTE_ADDR=127.0.0.1 \
php --run="parse_str(\$argv[1], \$_POST); include('install.php');" \
"language=en_US&dbhost=mysql&dbuser=$MYSQL_ENV_MYSQL_USER&dbpasswd=$MYSQL_ENV_MYSQL_PASSWORD&dbname=$MYSQL_ENV_MYSQL_DATABASE&prefix=piwigo_&admin_name=admin&admin_pass1=$PIWIGO_ADMIN_PASSWORD&admin_pass2=$PIWIGO_ADMIN_PASSWORD&admin_mail=admin@$PIWIGO_DOMAIN&install=Start%20installation"

* The web deamon does not need to be running, as this method uses php CLI
* Replace the $MYSQL and $PIWIGO variables with your own values.

Hope this is useful.

 

#2 2016-03-13 18:32:15

drbubbles
Member
2015-07-02
7

Re: How to initialize piwigo from command line.

This is really useful, thanks.  Is there a straightforward way to extend this to install a list of plugins too?

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact