|
2 | 2 |
|
3 | 3 | Dockerized [i-doit CMDB](https://i-doit.com/)
|
4 | 4 |
|
| 5 | +[](https://travis-ci.org/bheisig/i-doit-docker) |
| 6 | + |
5 | 7 | ## Not production-ready!
|
6 | 8 |
|
7 | 9 | **The provided Docker images aren't production-ready. Please do not rely on them. They come "as is" with absolutely no warranty. They are not an official product by synetics GmbH. Therefore, we can't provide you any support.**
|
@@ -81,13 +83,74 @@ Run the latest version of i-doit pro with PHP 7.3 and FPM:
|
81 | 83 | docker run i-doit-fpm -p 9000:9000 bheisig/idoit:1.13-pro-php7.3-fpm
|
82 | 84 | ~~~
|
83 | 85 |
|
| 86 | +### Available volumes |
| 87 | + |
| 88 | +Each i-doit container has one default volume containing the complete installation directory: `/var/www/html`. This directory includes the source code, cache files, uploaded files, installed add-ons, custom translation files, etc. |
| 89 | + |
84 | 90 | ### Run i-doit with Docker Compose
|
85 | 91 |
|
86 | 92 | i-doit requires either MariaDB or MySQL as the database backend. Additionally, memcached is highly recommend. There are some examples:
|
87 | 93 |
|
88 | 94 | - [Run with Apache HTTPD](docker-compose-apache.yml)
|
89 | 95 | - [Run with PHP-FPM](docker-compose-fpm.yml)
|
90 | 96 |
|
| 97 | +### Run i-doit CLI tool |
| 98 | + |
| 99 | +i-doit has its own CLI tool named `console.php` for long-lasting, recurring tasks or automating things in background. You can execute any CLI command in the running Docker container, for example: |
| 100 | + |
| 101 | +~~~ {.bash} |
| 102 | +docker exec -it --user www-data i-doit-fpm php console.php --help |
| 103 | +~~~ |
| 104 | + |
| 105 | +### Update i-doit |
| 106 | + |
| 107 | +_This is currently not working as smoothly as expected._ |
| 108 | + |
| 109 | +### Backup and restore |
| 110 | + |
| 111 | +For a fully backup and restore process you need to consider at least 3 sources: |
| 112 | + |
| 113 | +1. i-doit installation directory (see section "Available volumes") |
| 114 | +2. System database (default: `idoit_system`) |
| 115 | +3. Each tenant database (default 1st one: `idoit_data`) |
| 116 | + |
| 117 | +As you can see in the examples for `docker-compose` (see section "Run i-doit with Docker Compose") the simplest thing is to backup the named volumes. But for a running instance of MariaDB this is a bad solution because everything stored temporarily in memory won't be backed up. Therefore, run `mysqldump` (for backup) and `mysql` (for restore) to fetch every bit stored in the databases. |
| 118 | + |
| 119 | +This is a basic example to backup everything in a running environment: |
| 120 | + |
| 121 | +~~~ {.bash} |
| 122 | +docker exec i-doit-fpm /bin/tar cvf - . | gzip -9 > /tmp/ben/backup.tar.gz |
| 123 | +docker exec i-doit-fpm /usr/bin/mysqldump -uidoit -pidoit --all-databases | gzip -9 > backup.sql.gz |
| 124 | +~~~ |
| 125 | + |
| 126 | +This is a basic example to restore those backups: |
| 127 | + |
| 128 | +~~~ {.bash} |
| 129 | +cat backup.tar.gz | docker exec -interactive i-doit-fpm /bin/tar xzvf - |
| 130 | +gunzip < backup.sql.gz | docker exec -interactive i-doit-fpm /usr/bin/mysql -uidoit -pidoit |
| 131 | +~~~ |
| 132 | + |
| 133 | +Don't forget to alter the commands above to your needs. |
| 134 | + |
| 135 | +### Add a subscription license |
| 136 | + |
| 137 | +Copy the file to the running i-doit container and import the file with the i-doit CLI tool: |
| 138 | + |
| 139 | +~~~ {.bash} |
| 140 | +docker cp license.txt i-doit-fpm:/tmp/ |
| 141 | +docker exec --interactive --user www-data i-doit-fpm php console.php license-add --user admin --password admin --no-interaction --license /tmp/license.txt |
| 142 | +~~~ |
| 143 | + |
| 144 | +### Move your CMDB data to a container |
| 145 | + |
| 146 | +There are no general instructions for this job because every environment is slightly different. The next example assumes that i-doit is currently installed on the same host as the running i-doit container: |
| 147 | + |
| 148 | +~~~ {.bash} |
| 149 | +cd /var/www/html/ |
| 150 | +tar czvf - . | docker exec -interactive i-doit-fpm /bin/tar xzvf - |
| 151 | +mysqldump -uidoit -pidoit --all-databases | docker exec -interactive i-doit-fpm /usr/bin/mysql -uidoit -pidoit |
| 152 | +~~~ |
| 153 | + |
91 | 154 | ### TLS/HTTPS
|
92 | 155 |
|
93 | 156 | It is _strongly_ recommended to access i-doit in a productive environment only via TLS/HTTPS. The provided images do not terminate TLS/HTTPS connections. Therefore, you need an additional load balancer or similar.
|
|
0 commit comments