Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please upgrade to support command line installation. #19

Open
jackadam1981 opened this issue Oct 26, 2018 · 1 comment
Open

Please upgrade to support command line installation. #19

jackadam1981 opened this issue Oct 26, 2018 · 1 comment

Comments

@jackadam1981
Copy link

https://glpi-install.readthedocs.io/en/latest/command-line.html#cdline-install

Since GLPI 9.2.2, command line tools are provided as supported scripts and are available from the scripts directory of the archive. On previous versions, those scripts were present in the tools directory that is not official and therefore not in the release archive.

Install

A PHP command line installation script is provided in the GLPI archive (scripts/cliinstall.php).

You have to specify at least a database name and an user:

php scripts/cliinstall.php --db=dbglpi --user=userglpi

It is possible to specifiy some variables calling the script:

    --host host name (localhost per default),
    --db database name,
    --user database user name,
    --pass database user’s pasword,
    --lang language code to use (fr_FR as example). Will be set to en_GB per default,
    --tests create tests configuration file,
    --force do not check if GLPI is already installed and drop what would exists,
    --help displays command help.

Update

An update script is provided as well (scripts/cliupdate.php).
Possible options for this command are:

    --lang language code to use (fr_FR as example). Will be set to en_GB per default,
    --help displays command help.
    --config-dir set configuration file path to use,
    --force force update, usefull when GLPI version does not change (mainly when working on it ;)),
    --dev required to use a development version. Use it with caution…

This is a good way to create or upgrade.

@jackadam1981
Copy link
Author

update Dockerfile

FROM diouxx/glpi
RUN sed -i '//usr/sbin/apache2ctl/i\php /var/www/html/glpi/scripts/cliinstall.php --host=$host --db=$db --user=$user --pass=$pass --lang=$lang' /opt/glpi-start.sh

and docker-compose.yaml

version: "3"

services:
glpi:
#image: diouxx/glpi
build:
context: .
dockerfile: glpidockefile
container_name: glpi
privileged: true
ports:
- "80:80"
networks:
- home
environment:
host: mariadb
db: glpi
user: glpi
pass: glpi
lang: zh_CN
volumes:
- /storage/date/glpi/:/var/www/html/glpi/

networks:
home:

it can help me connect different sqlserver and auto install。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant