Skip to content

Commit f81865a

Browse files
committed
refactor: consolidated updates 2026-01-12
1 parent 0b51576 commit f81865a

6 files changed

Lines changed: 184 additions & 61 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
1212
build:
13-
uses: daemonless/daemonless/.github/workflows/build-app.yml@main
13+
uses: daemonless/daemonless/.github/workflows/build-app.yaml@main
1414
with:
1515
image_name: openspeedtest
1616
secrets: inherit
File renamed without changes.

Containerfile

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
ARG BASE_VERSION=15
2-
ARG OPENSPEEDTEST_VERSION=2.0
32
FROM ghcr.io/daemonless/nginx-base:${BASE_VERSION}
43

54
ARG FREEBSD_ARCH=amd64
6-
ARG OPENSPEEDTEST_VERSION
5+
ARG OPENSPEEDTEST_VERSION=2.0
76
ARG PACKAGES="ca_root_nss"
87
ARG UPSTREAM_URL="https://api.github.com/repos/openspeedtest/Docker-Image/releases/latest"
98
ARG UPSTREAM_JQ=".tag_name"
10-
ARG HEALTHCHECK_ENDPOINT="http://localhost:3000/daemonless-ping"
9+
ARG HEALTHCHECK_ENDPOINT="http://localhost:3005/daemonless-ping"
1110

1211
ENV HEALTHCHECK_URL="${HEALTHCHECK_ENDPOINT}"
1312

13+
# --- Metadata (Injected by Generator) ---
1414
LABEL org.opencontainers.image.title="OpenSpeedTest" \
15-
org.opencontainers.image.description="HTML5 Network Speed Test on FreeBSD" \
16-
org.opencontainers.image.source="https://github.com/daemonless/openspeedtest" \
17-
org.opencontainers.image.url="https://openspeedtest.com/" \
18-
org.opencontainers.image.documentation="https://github.com/openspeedtest/Speed-Test" \
19-
org.opencontainers.image.version="${OPENSPEEDTEST_VERSION}" \
20-
org.opencontainers.image.licenses="MIT" \
21-
org.opencontainers.image.vendor="daemonless" \
22-
org.opencontainers.image.authors="daemonless" \
23-
io.daemonless.port="3000" \
24-
io.daemonless.arch="${FREEBSD_ARCH}" \
25-
io.daemonless.base="nginx" \
26-
io.daemonless.category="Utilities" \
27-
io.daemonless.upstream-url="${UPSTREAM_URL}" \
28-
io.daemonless.upstream-jq="${UPSTREAM_JQ}" \
29-
io.daemonless.healthcheck-url="${HEALTHCHECK_ENDPOINT}" \
30-
io.daemonless.packages="${PACKAGES}"
15+
org.opencontainers.image.description="Self-hosted HTML5 Network Speed Test on FreeBSD." \
16+
org.opencontainers.image.source="https://github.com/daemonless/openspeedtest" \
17+
org.opencontainers.image.url="https://openspeedtest.com/" \
18+
org.opencontainers.image.documentation="https://github.com/openspeedtest/Speed-Test" \
19+
org.opencontainers.image.version="${OPENSPEEDTEST_VERSION}" \
20+
org.opencontainers.image.licenses="MIT" \
21+
org.opencontainers.image.vendor="daemonless" \
22+
org.opencontainers.image.authors="daemonless" \
23+
io.daemonless.category="Utilities" \
24+
io.daemonless.port="3005" \
25+
io.daemonless.arch="${FREEBSD_ARCH}" \
26+
io.daemonless.base="nginx" \
27+
io.daemonless.upstream-url="${UPSTREAM_URL}" \
28+
io.daemonless.upstream-jq="${UPSTREAM_JQ}" \
29+
io.daemonless.healthcheck-url="${HEALTHCHECK_ENDPOINT}" \
30+
io.daemonless.packages="${PACKAGES}"
3131

3232
# Download OpenSpeedTest files
3333
RUN pkg update && pkg install -y ${PACKAGES} && \
@@ -45,6 +45,7 @@ COPY root/ /
4545

4646
RUN chmod +x /etc/cont-init.d/* 2>/dev/null || true
4747

48-
EXPOSE 3000
49-
48+
# --- Expose (Injected by Generator) ---
49+
EXPOSE 3005
5050

51+
# --- Volumes (Injected by Generator) ---

Containerfile.j2

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
ARG BASE_VERSION=15
2+
FROM ghcr.io/daemonless/nginx-base:${BASE_VERSION}
3+
4+
ARG FREEBSD_ARCH=amd64
5+
ARG OPENSPEEDTEST_VERSION=2.0
6+
ARG PACKAGES="ca_root_nss"
7+
ARG UPSTREAM_URL="https://api.github.com/repos/openspeedtest/Docker-Image/releases/latest"
8+
ARG UPSTREAM_JQ=".tag_name"
9+
{%- if ports %}
10+
ARG HEALTHCHECK_ENDPOINT="http://localhost:{{ ports[0].port }}/daemonless-ping"
11+
{%- else %}
12+
ARG HEALTHCHECK_ENDPOINT="http://localhost:3000/daemonless-ping"
13+
{%- endif %}
14+
15+
ENV HEALTHCHECK_URL="${HEALTHCHECK_ENDPOINT}"
16+
17+
# --- Metadata (Injected by Generator) ---
18+
LABEL org.opencontainers.image.title="{{ title }}" \
19+
org.opencontainers.image.description="{{ description }}" \
20+
org.opencontainers.image.source="{{ repo_url }}" \
21+
org.opencontainers.image.url="{{ web_url }}" \
22+
org.opencontainers.image.documentation="https://github.com/openspeedtest/Speed-Test" \
23+
org.opencontainers.image.version="${OPENSPEEDTEST_VERSION}" \
24+
org.opencontainers.image.licenses="MIT" \
25+
org.opencontainers.image.vendor="daemonless" \
26+
org.opencontainers.image.authors="daemonless" \
27+
io.daemonless.category="{{ category }}" \
28+
{%- if ports %}
29+
io.daemonless.port="{{ ports[0].port }}" \
30+
{%- endif %}
31+
{%- if volumes %}
32+
io.daemonless.volumes="{{ volumes | map(attribute='path') | join(',') }}" \
33+
{%- endif %}
34+
{%- if mlock %}
35+
org.freebsd.jail.allow.mlock="required" \
36+
{%- endif %}
37+
io.daemonless.arch="${FREEBSD_ARCH}" \
38+
io.daemonless.base="nginx" \
39+
io.daemonless.upstream-url="${UPSTREAM_URL}" \
40+
io.daemonless.upstream-jq="${UPSTREAM_JQ}" \
41+
io.daemonless.healthcheck-url="${HEALTHCHECK_ENDPOINT}" \
42+
io.daemonless.packages="${PACKAGES}"
43+
44+
# Download OpenSpeedTest files
45+
RUN pkg update && pkg install -y ${PACKAGES} && \
46+
pkg clean -ay && \
47+
rm -rf /var/cache/pkg/* /var/db/pkg/repos/* && \
48+
fetch -o /tmp/speedtest.tar.gz https://github.com/openspeedtest/Speed-Test/archive/refs/heads/main.tar.gz && \
49+
mkdir -p /usr/local/www/openspeedtest /app && \
50+
tar -xzf /tmp/speedtest.tar.gz -C /usr/local/www/openspeedtest --strip-components=1 && \
51+
rm /tmp/speedtest.tar.gz && \
52+
echo "${OPENSPEEDTEST_VERSION}" > /app/version && \
53+
chown -R bsd:bsd /usr/local/www/openspeedtest
54+
55+
# Copy custom nginx config for OpenSpeedTest
56+
COPY root/ /
57+
58+
RUN chmod +x /etc/cont-init.d/* 2>/dev/null || true
59+
60+
# --- Expose (Injected by Generator) ---
61+
{%- if ports %}
62+
EXPOSE {{ ports | map(attribute='port') | join(' ') }}
63+
{%- endif %}
64+
65+
# --- Volumes (Injected by Generator) ---
66+
{%- if volumes %}
67+
VOLUME {{ volumes | map(attribute='path') | join(' ') }}
68+
{%- endif %}

README.md

Lines changed: 58 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,84 @@
1-
# openspeedtest
1+
# OpenSpeedTest
22

3-
Free and open-source HTML5 network speed test.
3+
Self-hosted HTML5 Network Speed Test on FreeBSD.
44

5-
## Environment Variables
5+
| | |
6+
|---|---|
7+
| **Port** | 3005 |
8+
| **Registry** | `ghcr.io/daemonless/openspeedtest` |
9+
| **Source** | [https://github.com/openspeedtest/Speed-Test](https://github.com/openspeedtest/Speed-Test) |
10+
| **Website** | [https://openspeedtest.com/](https://openspeedtest.com/) |
611

7-
| Variable | Description | Default |
8-
|----------|-------------|---------|
9-
| `PUID` | User ID for the application process | `1000` |
10-
| `PGID` | Group ID for the application process | `1000` |
11-
| `TZ` | Timezone for the container | `UTC` |
12-
| `S6_LOG_ENABLE` | Enable/Disable file logging | `1` |
13-
| `S6_LOG_MAX_SIZE` | Max size per log file (bytes) | `1048576` |
14-
| `S6_LOG_MAX_FILES` | Number of rotated log files to keep | `10` |
12+
## Deployment
1513

16-
## Logging
14+
### Podman Compose
1715

18-
This image uses `s6-log` for internal log rotation.
19-
- **System Logs**: Captured from console and stored at `/config/logs/daemonless/openspeedtest/`.
20-
- **Application Logs**: Managed by the app and typically found in `/config/logs/`.
21-
- **Podman Logs**: Output is mirrored to the console, so `podman logs` still works.
16+
```yaml
17+
services:
18+
openspeedtest:
19+
image: ghcr.io/daemonless/openspeedtest:latest
20+
container_name: openspeedtest
21+
environment:
22+
- PUID=1000
23+
- PGID=1000
24+
- TZ=UTC
25+
volumes:
26+
ports:
27+
- 3005:3005
28+
restart: unless-stopped
29+
```
2230
23-
## Quick Start
31+
### Podman CLI
2432
2533
```bash
2634
podman run -d --name openspeedtest \
27-
-p 3000:3000 \
35+
-p 3005:3005 \
36+
-e PUID=@PUID@ \
37+
-e PGID=@PGID@ \
38+
-e TZ=@TZ@ \
2839
ghcr.io/daemonless/openspeedtest:latest
2940
```
41+
Access at: `http://localhost:3005`
3042

31-
Access at: http://localhost:3000
32-
33-
## podman-compose
43+
### Ansible
3444

3545
```yaml
36-
services:
37-
openspeedtest:
46+
- name: Deploy openspeedtest
47+
containers.podman.podman_container:
48+
name: openspeedtest
3849
image: ghcr.io/daemonless/openspeedtest:latest
39-
container_name: openspeedtest
50+
state: started
51+
restart_policy: always
52+
env:
53+
PUID: "1000"
54+
PGID: "1000"
55+
TZ: "UTC"
4056
ports:
41-
- 3000:3000
42-
restart: unless-stopped
57+
- "3005:3005"
4358
```
4459
45-
## Tags
60+
## Configuration
61+
62+
### Environment Variables
4663
47-
| Tag | Source | Description |
48-
|-----|--------|-------------|
49-
| `:latest` | [Upstream Releases](https://github.com/openspeedtest/Speed-Test) | Latest from git |
64+
| Variable | Default | Description |
65+
|----------|---------|-------------|
66+
| `PUID` | `1000` | User ID for the application process |
67+
| `PGID` | `1000` | Group ID for the application process |
68+
| `TZ` | `UTC` | Timezone for the container |
5069

51-
## Ports
70+
### Volumes
5271

53-
| Port | Description |
72+
| Path | Description |
5473
|------|-------------|
55-
| 3000 | Web UI |
5674

57-
## Notes
75+
### Ports
5876

59-
- **Base:** Built on `ghcr.io/daemonless/nginx-base-image` (FreeBSD)
60-
- **Storage:** No persistent storage required (client-side only)
77+
| Port | Protocol | Description |
78+
|------|----------|-------------|
79+
| `3005` | TCP | |
6180

62-
## Links
81+
## Notes
6382

64-
- [Website](https://openspeedtest.com/)
65-
- [GitHub](https://github.com/openspeedtest/Speed-Test)
83+
- **User:** `bsd` (UID/GID set via PUID/PGID)
84+
- **Base:** Built on `ghcr.io/daemonless/base` (FreeBSD)

compose.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: openspeedtest
2+
3+
x-daemonless:
4+
title: "OpenSpeedTest"
5+
icon: ":material-speedometer:"
6+
category: "Utilities"
7+
description: "Self-hosted HTML5 Network Speed Test on FreeBSD."
8+
upstream_url: "https://github.com/openspeedtest/Speed-Test"
9+
web_url: "https://openspeedtest.com/"
10+
freshports_url: ""
11+
user: "bsd"
12+
mlock: false
13+
upstream_binary: true
14+
15+
docs:
16+
env:
17+
PUID: "User ID for the application process"
18+
PGID: "Group ID for the application process"
19+
TZ: "Timezone for the container"
20+
ports:
21+
3000: "Web UI"
22+
23+
services:
24+
openspeedtest:
25+
image: ghcr.io/daemonless/openspeedtest:latest
26+
container_name: openspeedtest
27+
restart: unless-stopped
28+
29+
environment:
30+
- PUID=1000
31+
- PGID=1000
32+
- TZ=UTC
33+
34+
ports:
35+
- "3005:3000"

0 commit comments

Comments
 (0)