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
90 changes: 90 additions & 0 deletions .github/workflows/docker-dxspider-proxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Build and Publish dxspider-proxy container image

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/dxspider-proxy

on:
push:
branches: ['*']
paths:
- 'dxspider-proxy/**'
- '.github/workflows/docker-dxspider-proxy.yml'
pull_request:
branches:
- Staging
- main
paths:
- 'dxspider-proxy/**'
- '.github/workflows/docker-dxspider-proxy.yml'
release:
types: [published]
# Allows running this workflow manually from the Actions tab
workflow_dispatch:

permissions:
contents: read
packages: write

jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
attestations: write
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Set up QEMU
uses: docker/setup-qemu-action@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4

- name: Log in to the Container registry
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v6
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha,format=long
type=raw,value=latest,enable={{is_default_branch}}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}

- name: Build and push Docker image
id: push
uses: docker/build-push-action@v7
with:
context: .
push: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha,scope=${{ github.workflow }}
cache-to: type=gha,scope=${{ github.workflow }},mode=max
provenance: true
sbom: true

- name: Generate artifact attestation
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
uses: actions/attest-build-provenance@v4
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
90 changes: 90 additions & 0 deletions .github/workflows/docker-iturhfprop-service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Build and Publish iturhfprop-service container image

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/iturhfprop-service

on:
push:
branches: ['*']
paths:
- 'iturhfprop-service/**'
- '.github/workflows/docker-iturhfprop-service.yml'
pull_request:
branches:
- Staging
- main
paths:
- 'iturhfprop-service/**'
- '.github/workflows/docker-iturhfprop-service.yml'
release:
types: [published]
# Allows running this workflow manually from the Actions tab
workflow_dispatch:

permissions:
contents: read
packages: write

jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
attestations: write
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Set up QEMU
uses: docker/setup-qemu-action@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4

- name: Log in to the Container registry
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v6
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha,format=long
type=raw,value=latest,enable={{is_default_branch}}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}

- name: Build and push Docker image
id: push
uses: docker/build-push-action@v7
with:
context: .
push: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha,scope=${{ github.workflow }}
cache-to: type=gha,scope=${{ github.workflow }},mode=max
provenance: true
sbom: true

- name: Generate artifact attestation
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
uses: actions/attest-build-provenance@v4
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
name: Build and Publish Docker Image
name: Build and Publish OHC container image

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

on:
push:
branches: ['main']
branches: ['*']
paths-ignore:
- 'iturhfprop-service/**'
- 'dxspider-proxy/**'
pull_request:
branches:
- Staging
- main
paths-ignore:
- 'iturhfprop-service/**'
- 'dxspider-proxy/**'
release:
types: [published]
# Allows running this workflow manually from the Actions tab
workflow_dispatch:

permissions:
contents: read
packages: write

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push:
if: github.repository == 'accius/openhamclock'
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -26,41 +37,41 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: Log in to the Container registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha,prefix={{branch}}-,enable=${{ github.event_name != 'release' }}
type=sha,format=long
type=raw,value=latest,enable={{is_default_branch}}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}

- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
push: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
Expand All @@ -71,8 +82,8 @@ jobs:
sbom: true

- name: Generate artifact attestation
if: github.event_name != 'pull_request'
uses: actions/attest-build-provenance@v1
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
uses: actions/attest-build-provenance@v4
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.push.outputs.digest }}
Expand Down
39 changes: 4 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ OpenHamClock brings DX cluster spots, space weather, propagation predictions, PO
### Container Deployment

Container images are available from the github container registry at `ghcr.io/accius/openhamclock`
Follow [these steps](#using-docker) for a docker-based deployment
Follow [the quick-start steps](docs/DOCKER.md#quick-start-zero-config)

### Local Install

Expand Down Expand Up @@ -96,7 +96,7 @@ npm run dev

### Enabling Client-side Propagation Calculation (without having to build it)

If you want your clients (using your local server) to use the p533 modules for client side propagation calculation rather than the very rough estimates (which are based on band and time of day), run teh following as the user who can write to your repository.
If you want your clients (using your local server) to use the p533 modules for client side propagation calculation rather than the very rough estimates (which are based on band and time of day), run the following as the user who can write to your repository.

```bash
scripts/fetch-wasm.sh
Expand Down Expand Up @@ -1059,35 +1059,7 @@ The Pi setup script installs Node.js 22 LTS, clones the repository, builds the f

### Using Docker

**Docker Compose (recommended):**

Grab `docker-compose.yml` and `.env.example` from the repo root, rename `.env.example` to `.env` and adjust the variables in `.env` to configure OpenHamClock.

Start the container:

```bash
docker compose up -d
```

**Manual Docker build:**

```bash
docker build -t openhamclock .
docker run -d -p 3000:3000 -p 2237:2237/udp --name openhamclock openhamclock
```

The Dockerfile uses a multi-stage build: Stage 1 compiles the React frontend with Vite, Stage 2 creates a minimal production image with only the server and built assets. The UDP port mapping (`-p 2237:2237/udp`) is only needed if you use WSJT-X integration.

**Environment variables:** Pass your configuration via Docker environment variables:

```bash
docker run -d \
-p 3000:3000 \
-e CALLSIGN=K0CJH \
-e LOCATOR=EN10 \
-e HOST=0.0.0.0 \
openhamclock
```
Follow the [docker documentation](docs/DOCKER.md)

### Railway (Cloud)

Expand Down Expand Up @@ -1223,10 +1195,7 @@ On local installs, you can also click the **UPDATE** button in the header to sta

### Docker

```bash
docker-compose pull
docker-compose up -d
```
[Docker documentation on updating](docs/DOCKER.md#updating)

### Railway

Expand Down
Loading
Loading