Skip to content

Commit a2f1d0b

Browse files
committed
support multi-arch builds
1 parent 88a1fe6 commit a2f1d0b

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

startos/main.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { sdk } from './sdk'
2-
import { T } from '@start9labs/start-sdk'
3-
import { ensureFileExists, uiPort } from './utils'
2+
import { uiPort } from './utils'
43
import { exec } from 'child_process'
54

65
export const main = sdk.setupMain(async ({ effects, started }) => {

startos/manifest.ts

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
import { setupManifest } from '@start9labs/start-sdk'
22
import { SDKImageInputSpec } from '@start9labs/start-sdk/base/lib/types/ManifestTypes'
33

4-
// the following allows us to build the service for x86 or arm64 specifically
5-
// use: 'make x86' or 'make arm' ('make' will build both)
64
const BUILD = process.env.BUILD || ''
7-
const arch =
8-
BUILD === 'x86'
9-
? ['x86_64']
10-
: BUILD === 'arm'
11-
? ['aarch64']
12-
: ['x86_64', 'aarch64']
5+
6+
const architectures =
7+
BUILD === 'x86_64' || BUILD === 'aarch64' ? [BUILD] : ['x86_64', 'aarch64']
138

149
export const manifest = setupManifest({
1510
id: 'axeos-monitor-aio',
@@ -19,7 +14,8 @@ export const manifest = setupManifest({
1914
upstreamRepo: 'https://github.com/remcoros/axeos-monitor-aio-startos',
2015
supportSite: 'https://github.com/remcoros/axeos-monitor-aio-startos',
2116
marketingSite: 'https://github.com/remcoros/axeos-monitor-aio-startos',
22-
docsUrl: 'https://github.com/remcoros/axeos-monitor-aio-startos/blob/main/instructions.md',
17+
docsUrl:
18+
'https://github.com/remcoros/axeos-monitor-aio-startos/blob/main/instructions.md',
2319
donationUrl: 'https://github.com/remcoros/',
2420
description: {
2521
short: 'AxeOS Monitor (all in one)',
@@ -28,25 +24,27 @@ export const manifest = setupManifest({
2824
volumes: ['grafana', 'prometheus'],
2925
images: {
3026
grafana: {
31-
arch: arch,
27+
arch: architectures,
3228
source: {
3329
dockerTag: 'grafana/grafana-oss:12.1.1',
3430
},
3531
} as SDKImageInputSpec,
3632
prometheus: {
37-
arch: arch,
33+
arch: architectures,
3834
source: {
3935
dockerTag: 'prom/prometheus:v3.5.0',
4036
},
4137
} as SDKImageInputSpec,
4238
'json-exporter': {
43-
arch: arch,
39+
arch: architectures,
4440
source: {
4541
dockerTag: 'prometheuscommunity/json-exporter:v0.7.0',
4642
},
4743
} as SDKImageInputSpec,
4844
},
49-
hardwareRequirements: {},
45+
hardwareRequirements: {
46+
arch: architectures,
47+
},
5048
alerts: {
5149
install: null,
5250
update: null,

0 commit comments

Comments
 (0)