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
5 changes: 1 addition & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ jobs:
name: fluidd-${{ github.sha }}.zip
path: ./dist

- name: Update nginx configuration
run: |
sed -i "s/\${PORT} default_server;/${{ matrix.port }} default_server;/g" ./server/nginx/default.conf.template

- name: Prepare Docker image metadata
id: docker_meta
uses: docker/metadata-action@v6
Expand Down Expand Up @@ -136,6 +132,7 @@ jobs:
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8
build-args: |
BASE_IMAGE=${{ matrix.base-image }}
PORT=${{ matrix.port }}
push: true
sbom: true
provenance: true
Expand Down
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@ ARG BASE_IMAGE=nginx:alpine-slim

FROM $BASE_IMAGE

ARG PORT=80
ENV PORT=${PORT}

COPY /dist /usr/share/nginx/html
COPY /server/nginx /etc/nginx/templates

HEALTHCHECK --interval=10s --timeout=3s --start-period=10s --retries=3 \
CMD wget -q -O /dev/null -T 2 "http://127.0.0.1:${PORT}/healthz" || exit 1
21 changes: 21 additions & 0 deletions docs/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,27 @@ Both are updated on each release and each commit. Available tags:

[View on GitHub Container registry](https://github.com/fluidd-core/fluidd/pkgs/container/fluidd){.md-button}

### Health Check

Both images ship a Docker `HEALTHCHECK` that polls `/healthz` on the image's own
port, so `docker ps` reports the container as `healthy` once NGINX is serving:

```bash
docker inspect --format '{{.State.Health.Status}}' fluidd
```

With Docker Compose, other services can wait for it:

```yaml
depends_on:
fluidd:
condition: service_healthy
```

The endpoint is a plain `200 ok` response and is excluded from the access log.
The check runs every 10 seconds and can be overridden per-deployment with the
`healthcheck` key in Compose.

## Manual Installation

Every Fluidd release includes a pre-built `fluidd.zip` on the
Expand Down
6 changes: 6 additions & 0 deletions server/nginx/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,10 @@ server {
location = /index.html {
add_header Cache-Control "no-store, no-cache, must-revalidate";
}

location = /healthz {
access_log off;
default_type text/plain;
return 200 "ok\n";
}
}