Skip to content

Commit b4d117a

Browse files
committed
Write documentation on various topics
- Volumes - CLI tool console.php - Update/backup/restore/move i-doit and - Subscription licenses Also: - Add build badge
1 parent a9e8010 commit b4d117a

File tree

2 files changed

+64
-1
lines changed

2 files changed

+64
-1
lines changed

CODE_OF_CONDUCT.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ Project maintainers who do not follow or enforce the Code of Conduct in good fai
4343
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct/>
4444

4545
[homepage]: https://www.contributor-covenant.org
46-
[mail]: bheisig@i-doit.com
46+
[mail]: mailto:bheisig@i-doit.com

README.md

+63
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Dockerized [i-doit CMDB](https://i-doit.com/)
44

5+
[![Build Status](https://travis-ci.org/bheisig/i-doit-docker.svg?branch=master)](https://travis-ci.org/bheisig/i-doit-docker)
6+
57
## Not production-ready!
68

79
**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:
8183
docker run i-doit-fpm -p 9000:9000 bheisig/idoit:1.13-pro-php7.3-fpm
8284
~~~
8385

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+
8490
### Run i-doit with Docker Compose
8591

8692
i-doit requires either MariaDB or MySQL as the database backend. Additionally, memcached is highly recommend. There are some examples:
8793

8894
- [Run with Apache HTTPD](docker-compose-apache.yml)
8995
- [Run with PHP-FPM](docker-compose-fpm.yml)
9096

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+
91154
### TLS/HTTPS
92155

93156
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

Comments
 (0)