Skip to content

Commit

Permalink
Updated to match ateodorescu latest ipmi-server 1.2.7 and added a 300…
Browse files Browse the repository at this point in the history
…s timeout for fastcgi
  • Loading branch information
mneveroff committed Apr 15, 2024
1 parent a271e28 commit d504fce
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ It was initially inspired by the [home-assistant-ipmi](https://github.com/ateodo
## How to use

You can find full installation guide in my blog: [neveroff.dev/blog/ipmi-control-in-apple-home/](neveroff.dev/blog/ipmi-control-in-apple-home/)
You can find full installation guide in my blog: [neveroff.dev/blog/ipmi-control-in-apple-home/](https://neveroff.dev/blog/ipmi-control-in-apple-home/)

### Docker Compose

Expand Down Expand Up @@ -60,6 +60,21 @@ To integrate it with HomeAssistant you can use [home-assistant-ipmi](https://git

If you want to build this container yourself feel free to use the snippet below, replace the -tag definitions as you please. For buildx reference look [here](https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/).

```bash
docker buildx build \
--platform linux/amd64 \
--build-arg BUILD_ARCH=amd64 \
--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
--build-arg BUILD_REF=$(git rev-parse --short HEAD) \
--build-arg BUILD_VERSION=1.0.0 \
--build-arg BUILD_REPOSITORY="mneveroff/ipmi-server" \
--tag mneveroff/ipmi-server:latest \
--tag mneveroff/ipmi-server:1.0.0 \
--load .
```

Or to build and push:

``` bash
docker buildx build \
--push \
Expand Down Expand Up @@ -92,4 +107,4 @@ To ensure that you can build for multiplatform you need to enable `docker buildx

Replace the repository, and `<name>`:`<version>` respectively

The resulting docker container can to be used with `-p 9595:80` if you want to quickly test it against `localhost:9595`
The resulting docker container can to be used with `-p 9595:80` if you want to quickly test it against `localhost:9595` via `docker run -p 9595:80 mneveroff/ipmi-server:latest`
2 changes: 1 addition & 1 deletion rootfs/app/src/Controller/IpmiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class IpmiController
'fan' => 'RPM'
];
private array $debug = [];
const COMMAND_TIMEOUT = 50;
const COMMAND_TIMEOUT = 600;
const DEFAULT_PORT = 623;
const DEFAULT_USERNAME = 'ADMIN';

Expand Down
3 changes: 3 additions & 0 deletions rootfs/etc/nginx/servers/ipmi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ server {
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;

# Increase timeout to 600 seconds to account for slow IPMI clients
fastcgi_read_timeout 600;

# optionally set the value of the environment variables used in the application
# fastcgi_param APP_ENV prod;
# fastcgi_param APP_SECRET <app-secret-id>;
Expand Down

0 comments on commit d504fce

Please sign in to comment.