-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from Jalle19/hidden-sensors
Hidden sensors, logger, configurability, Docker
- Loading branch information
Showing
21 changed files
with
469 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,6 @@ | |
"@typescript-eslint" | ||
], | ||
"rules": { | ||
"no-console": "error" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,29 @@ | ||
FROM node:20-bookworm AS builder | ||
FROM node:20-bookworm-slim AS builder | ||
|
||
WORKDIR /app | ||
COPY . /app | ||
|
||
RUN npm install | ||
# Copy all files needed to build the app | ||
COPY package.json /app | ||
COPY package-lock.json /app | ||
COPY tsconfig.json /app | ||
COPY src/ /app/src | ||
COPY webif/ /app/webif | ||
|
||
RUN npm run build | ||
# Install dependencies and build the app and web interface | ||
RUN npm install | ||
RUN npm run build-all | ||
|
||
FROM node:20-bookworm AS runtime | ||
FROM node:20-bookworm-slim AS runtime | ||
|
||
WORKDIR /app | ||
COPY . /app | ||
COPY --from=builder /app/dist/* /app | ||
|
||
RUN npm install --omit=dev | ||
# Copy everything needed to install dependencies | ||
COPY package.json /app | ||
COPY package-lock.json /app | ||
RUN npm install --omit=dev --ignore-scripts | ||
|
||
# Copy the built apps | ||
COPY --from=builder /app/dist /app/dist | ||
COPY --from=builder /app/webif/build /app/webif/build | ||
|
||
ENTRYPOINT ["node", "dist/eachwatt.js"] | ||
ENTRYPOINT ["node", "dist/eachwatt.js", "-c", "/data/config.yml"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
settings: | ||
pollingInterval: 5000 | ||
httpPort: 8080 | ||
|
||
circuits: | ||
# mains | ||
- name: Main total | ||
|
Oops, something went wrong.