Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
HTML_FOLDER=./html/
DATA_FOLDER=./data/
DB_ROOT_PASSSWORD=!mypassword!
ENABLE_NGINX=1
ENABLE_APACHE=0
DB_ROOT_PASSWORD=!mypassword!
ENABLE_NGINX=0
ENABLE_APACHE=1
ENABLE_ADMINER=1
ENABLE_MAILPIT=1
2 changes: 1 addition & 1 deletion addons/documentation/how_to.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ Use `--force-recreate` to force the recreation of containers.

[Official documentation](https://docs.docker.com/compose/reference/up/)

### Remove docker environment
### Shut down docker environment

Run `docker compose down` with host bash in the project root directory.

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 68 additions & 0 deletions addons/documentation/itop_installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
🔙 [Back to readme page](../../readme.md)
# iTop installation
> [!NOTE]
> **All these steps are to be executed [inside the dockered-itop project](./phpstorm.md#open-a-terminal-inside-the-wsl2-host).**

### Change the current working directory
`cd html`

### Clone the iTop repository
`git clone https://github.com/Combodo/iTop.git`

### Update iTop ownership
`sudo chown www-data iTop -R && sudo chmod g+w iTop -R`

### Configure iTop
Visit http://localhost:88/iTop/ to start configuring the software.

![Prerequisites](/addons/documentation/images/itop_install/wizard1-prerequisites.png "Prerequisites")

You should be welcomed with a screen like above where prerequisites are ok.
> [!WARNING]
> You may have a security warning regarding the `AllowOverride` directive for Apache if you chose to edit the .env file to use Nginx instead, which can safely be ignored.

Click `Continue`.

![Installation Type](/addons/documentation/images/itop_install/wizard2-installation-type.png "Installation Type")

Select `Install a new iTop` then click `Next`.

![License Agreement](/addons/documentation/images/itop_install/wizard3-license-agreement.png "License Agreement")

Check both inputs :
- [x] I accept the terms of the licenses of the 103 components mentioned above.
- [x] I accept the processing of my personal data

Click `Next`.

![Database Configuration](/addons/documentation/images/itop_install/wizard4-database-configuration.png "Database Configuration")

- The `Server Name` field should contain the name of the docker container hosting your database. You can choose between `mariadb` and `mysql`.
- The `Login` field should contain `root`.
- The `Password` field should contain the value set in the `.env` file for the `DB_ROOT_PASSWORD` key.

Click `Next`.

![Admin Account Config](/addons/documentation/images/itop_install/wizard5-admin-account-config.png "Admin Account Config")

Define your iTop admin account with a login and password of your choice.

Click `Next`.

The following screens allow you to set different options, you can read those, the default ones are good to get started so no change is needed here.

![Summary](/addons/documentation/images/itop_install/wizard12-summary.png "Summary")

When reaching the summary, you can click `Install`.

![Installation](/addons/documentation/images/itop_install/wizard13-installation.png "Installation")

Wait for the installation to complete, this should only take a few seconds.

![Success](/addons/documentation/images/itop_install/wizard14-success.png "Success")

You should see a success message. Click `Enter iTop` to start using the software.

\
\
🔙 [Back to readme page](../../readme.md)
51 changes: 40 additions & 11 deletions addons/documentation/phpstorm.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ Tips for using PHPStorm with Docker.

Go to database view, choose `Add >> Database Source >> MariaDB`

![Database Create](/addons/documentation/images/phpstorm_database_create.png)
![Database Create](/addons/documentation/images/phpstorm/database_create.png)

Set localhost with the port defined in docker compose file (3306 by default).
Set password defined in `.env` file.

![Database](/addons/documentation/images/phpstorm_database.png)
![Database](/addons/documentation/images/phpstorm/database.png)

## Import a Dump File

Expand All @@ -27,31 +27,31 @@ Go to PHP CLI interpreter settings section `File >> Settings >> Languages & Fram
Click on the `...` button to add a new interpreter.\
Click on `+` button and choose `From Docker, Vagrant, VM, WSL...`

![CLI](/addons/documentation/images/phpstorm_cli.png)
![CLI](/addons/documentation/images/phpstorm/cli.png)

Choose `Docker` and set the following options:\
Choose the php image you want to use from the list `php:8.1-fpm`

![CLI Edit](/addons/documentation/images/phpstorm_cli_edit.png)
![CLI Edit](/addons/documentation/images/phpstorm/cli_edit.png)

Create a new server and set the following options:\
Choose `WSL` with your `docker host`.

![CLI Docker Server](/addons/documentation/images/phpstorm_docker_server.png)
![CLI Docker Server](/addons/documentation/images/phpstorm/docker_server.png)

You need to set addition information from php section.

![CLI Settings](/addons/documentation/images/phpstorm_cli_settings.png)
![CLI Settings](/addons/documentation/images/phpstorm/cli_settings.png)

First set `path mappings` for the project.\
Set the correct location of your project.

![CLI Path Mapping](/addons/documentation/images/phpstorm_cli_path_mapping.png)
![CLI Path Mapping](/addons/documentation/images/phpstorm/cli_path_mapping.png)

Then set `container settings` for the project.\
You need to set the `network name` dockered_itop_default.

![CLI Container Settings](/addons/documentation/images/phpstorm_cli_container_settings.png)
![CLI Container Settings](/addons/documentation/images/phpstorm/cli_container_settings.png)

Add other php versions as needed.

Expand All @@ -60,15 +60,44 @@ Add other php versions as needed.
In the PhpStorm services view, click on the `+` button and choose `Docker, Connection, WSL...`.\
You will have access to docker containers and images.

![Services](/addons/documentation/images/phpstorm_services.png)
![Services](/addons/documentation/images/phpstorm/services.png)

This is easy from here to control container and see logs.

![Services](/addons/documentation/images/phpstorm_services_container_log.png)
![Services](/addons/documentation/images/phpstorm/services_container_log.png)

You may also perform terminal commands in the container.

![Services](/addons/documentation/images/phpstorm_services_container_terminal.png)
![Services](/addons/documentation/images/phpstorm/services_container_terminal.png)

## Open a terminal inside the WSL2 host

Inside PHPStorm's terminal pane, using the dropdown arrow allows you to select the `dockered-itop` WSL2 host, where you can run commands to [install iTop](./itop_installation.md).

![Services](/addons/documentation/images/phpstorm/wsl2_terminal.png)

## Xdebug
Open the iTop project in PHPStorm.

### Debugger
In PHPStorm settings, under PHP > Debug, you can uncheck these options :
- Xdebug
- [ ] Force break at first line when no path mapping specified
- [ ] Force break at first line when a script is outside the project
- Evaluation
- Settings
- [ ] Notify if debug session was finished without being paused

### Servers
In PHPStorm settings, under PHP > Servers, add a new server with the following configuration :
- Host : localhost
- Port : 88
- Debugger : Xdebug


Check the following option to configure path mappings :
- [X] Use path mappings (select if the server is remote or symlinks are used)
- Add a target to the default option from `//wsl.localhost/dockered-itop/home/{your-username}/docker_environment/html/iTop` (which should already be filled in with the appropriate user) to `/var/www/html/iTop`.

\
\
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ services:
- ${DATA_FOLDER}/mariadb/:/var/lib/mysql
- ${DATA_FOLDER}/dbdump/:/tmp/dbdump
environment:
MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSSWORD}
MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}

mysql:
image: mysql
Expand All @@ -138,7 +138,7 @@ services:
- ${DATA_FOLDER}/mysql/:/var/lib/mysql
- ${DATA_FOLDER}/dbdump/:/tmp/dbdump
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSSWORD}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}

adminer:
image: adminer
Expand Down
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ The environment is designed to be easy to set up and use, with all necessary com

📓 [PHP Switcher Browser Extension](./addons/documentation/browser_extension.md)

📓 [iTop installation](./addons/documentation/itop_installation.md)

📓 [Troubleshooting](./addons/documentation/troubleshooting.md)

## Docker containers
Expand Down