# ICD-11 Docker Setup
This folder starts the local ICD-11 API container used by MaHIS.
## Start or create the container
```sh
./setup-icd11.sh
```
By default it uses:
- Container name: `mahis-icd11-api`
- Image: `whoicd/icd-api:latest`
- URL: `
127.0.0.1`
The command is safe to run more than once. If the container already exists, it starts it. If it does not exist, it creates it with Docker Compose.
## Change the local port
```sh
ICD11_HOST_PORT=6383 ./setup-icd11.sh
```
## Ubuntu Server notes
If the script says Docker cannot connect to the daemon, start Docker:
```sh
sudo systemctl start docker
sudo systemctl enable docker
```
If Docker is running but your user does not have permission, either run the setup with `sudo`:
```sh
sudo ./setup-icd11.sh
```
Or add your user to the `docker` group, then log out and back in:
```sh
sudo usermod -aG docker $USER
newgrp docker
```
The default URL `
127.0.0.1` is only reachable from the server itself. To make it reachable from another computer on your network, start it with:
```sh
ICD11_HOST_IP=0.0.0.0 ./setup-icd11.sh
```
## Stop the container
```sh
docker stop mahis-icd11-api
```
If the container was created by this folder and you want to remove it:
```sh
docker compose down
```