Skip to content

Commit 41d4060

Browse files
committed
Add offline Docker bundle workflow and files
Introduce a GitHub Actions workflow to package required Docker images into an offline tarball and publish it as an artifact (and as a release asset on publish). The workflow (/.github/workflows/offline-bundle.yml) pulls/builds the cloud-sync image, saves all images to universal-telemetry-software/deploy/offline/wfr-docker-images.tar, and uploads it; it can be triggered via workflow_dispatch, release (published), or pushes to timescale-sync/main/dev. Also add universal-telemetry-software/deploy/offline/.gitignore and a README with instructions to build, load, and run the MacBook offline stack.
1 parent f8a2ab0 commit 41d4060

3 files changed

Lines changed: 123 additions & 0 deletions

File tree

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Offline Docker Bundle
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
ref:
7+
description: 'Git ref to package (branch, tag, SHA)'
8+
required: true
9+
default: 'timescale-sync'
10+
11+
release:
12+
types: [published]
13+
14+
push:
15+
branches: [ timescale-sync, main, dev ]
16+
17+
env:
18+
REGISTRY: ghcr.io
19+
IMAGE_NAME: ${{ github.repository }}
20+
21+
jobs:
22+
package-offline:
23+
runs-on: ubuntu-latest
24+
permissions:
25+
contents: read
26+
packages: read
27+
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@v4
31+
with:
32+
ref: ${{ github.event.inputs.ref || github.ref }}
33+
34+
- name: Log in to Container Registry
35+
uses: docker/login-action@v3
36+
with:
37+
registry: ${{ env.REGISTRY }}
38+
username: ${{ github.actor }}
39+
password: ${{ secrets.GITHUB_TOKEN }}
40+
41+
- name: Set up Docker Buildx
42+
uses: docker/setup-buildx-action@v3
43+
44+
- name: Build cloud-sync image
45+
run: |
46+
docker compose -f universal-telemetry-software/deploy/docker-compose.macbook-base.yml build cloud-sync
47+
48+
- name: Pull all required images
49+
run: |
50+
docker pull ghcr.io/western-formula-racing/daq-radio/universal-telemetry:latest
51+
docker pull ghcr.io/western-formula-racing/daq-radio/pecan:latest
52+
docker pull timescale/timescaledb:latest-pg16
53+
docker pull redis:8.2
54+
docker pull bluenviron/mediamtx:latest
55+
docker pull grafana/grafana:latest
56+
57+
- name: Save images as tarball
58+
run: |
59+
cd universal-telemetry-software/deploy
60+
docker save \
61+
ghcr.io/western-formula-racing/daq-radio/universal-telemetry:latest \
62+
ghcr.io/western-formula-racing/daq-radio/pecan:latest \
63+
timescale/timescaledb:latest-pg16 \
64+
redis:8.2 \
65+
bluenviron/mediamtx:latest \
66+
deploy-cloud-sync:latest \
67+
grafana/grafana:latest \
68+
-o offline/wfr-docker-images.tar
69+
70+
- name: Upload as workflow artifact
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: wfr-docker-images-offline
74+
path: universal-telemetry-software/deploy/offline/wfr-docker-images.tar
75+
retention-days: 30
76+
77+
- name: Upload to Release
78+
if: github.event_name == 'release'
79+
uses: softprops/action-gh-release@v1
80+
with:
81+
files: universal-telemetry-software/deploy/offline/wfr-docker-images.tar
82+
env:
83+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.tar
2+
*.tar.gz
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Offline Docker Images
2+
3+
This folder contains a tarball of all Docker images needed to run the MacBook stack without internet.
4+
5+
## Build the tarball (with internet, before going to the field)
6+
7+
```bash
8+
cd universal-telemetry-software/deploy
9+
docker save \
10+
ghcr.io/western-formula-racing/daq-radio/universal-telemetry:latest \
11+
ghcr.io/western-formula-racing/daq-radio/pecan:latest \
12+
timescale/timescaledb:latest-pg16 \
13+
redis:8.2 \
14+
bluenviron/mediamtx:latest \
15+
deploy-cloud-sync:latest \
16+
grafana/grafana:latest \
17+
-o offline/wfr-docker-images.tar
18+
```
19+
20+
## Load the tarball (on site, no internet)
21+
22+
```bash
23+
cd universal-telemetry-software/deploy
24+
docker load -i offline/wfr-docker-images.tar
25+
```
26+
27+
## Bring up the stack offline
28+
29+
```bash
30+
cd universal-telemetry-software/deploy
31+
docker compose -f docker-compose.macbook-base.yml --env-file .env.macbook up -d
32+
```
33+
34+
Then access at:
35+
- Pecan: http://localhost:3000
36+
- Grafana: http://localhost:8087 (admin / admin)
37+
- Status: http://localhost:8080
38+
- Cloud Sync: http://localhost:8092

0 commit comments

Comments
 (0)