Skip to content
This repository was archived by the owner on Jul 1, 2024. It is now read-only.

Commit a2ebe57

Browse files
committed
Fri Apr 19 21:07:46 PDT 2024
1 parent 32a05a0 commit a2ebe57

3 files changed

Lines changed: 5 additions & 17 deletions

File tree

server/Dockerfile.addon

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,6 @@ RUN bun install --frozen-lockfile
1414

1515
FROM workspace
1616
COPY --from=build /usr/src/app/node_modules /usr/src/app/node_modules
17-
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
18-
jq curl
19-
20-
ARG BASHIO_VERSION="v0.16.2"
21-
22-
RUN curl -J -L -o /tmp/bashio.tar.gz \
23-
"https://github.com/hassio-addons/bashio/archive/${BASHIO_VERSION}.tar.gz" \
24-
&& mkdir /tmp/bashio \
25-
&& tar zxvf \
26-
/tmp/bashio.tar.gz \
27-
--strip 1 -C /tmp/bashio \
28-
&& mv /tmp/bashio/lib /usr/lib/bashio \
29-
&& ln -s /usr/lib/bashio/bashio /usr/bin/bashio
3017

3118
EXPOSE 2881
3219

@@ -52,4 +39,4 @@ LABEL \
5239
org.opencontainers.image.revision=${BUILD_REF} \
5340
org.opencontainers.image.version=${BUILD_VERSION}
5441

55-
CMD ["bun", "run", "/usr/src/app/server/src/index.ts"]
42+
CMD bun run -r server/src/services/hass.ts server/src/index.ts

server/src/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import { injectHassOptions } from './services/hass'
2-
await injectHassOptions()
3-
41
import { Elysia } from 'elysia'
52
import { swagger } from './services/swagger'
63
import { autoload } from "elysia-autoload"

server/src/services/hass.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ export const injectHassOptions = async () => {
1111
const raw = await readFile(OPTIONS_PATH, 'utf8')
1212
const options = JSON.parse(raw)
1313

14+
console.log('injecting hass options', options)
15+
1416
if (options.llm) {
1517
process.env.LLM = JSON.stringify(options.llm)
1618
}
@@ -24,3 +26,5 @@ export const injectHassOptions = async () => {
2426
"url": "ws://supervisor/core/websocket",
2527
})
2628
}
29+
30+
await injectHassOptions()

0 commit comments

Comments
 (0)