Skip to content

Commit

Permalink
Merge pull request #433 from mStirner/dev
Browse files Browse the repository at this point in the history
working on issues/versions updated
  • Loading branch information
mStirner committed Feb 1, 2024
2 parents efce07f + 8f61a16 commit 5a09bf3
Show file tree
Hide file tree
Showing 7 changed files with 258 additions and 231 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/docker-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,29 @@ jobs:
if: github.repository == 'OpenHausIO/backend'
steps:
- name: Check out the repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Node.js 18.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
- run: npm ci
- run: npm run build

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
uses: docker/login-action@v3.0.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
uses: docker/metadata-action@v5.5.0
with:
images: openhaus/backend

- name: Build and push Docker image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
uses: docker/build-push-action@v5.1.0
with:
context: .
file: ./Dockerfile
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/node-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node-version: [18.x, 20.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [16.x, 18.x, 20.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
mongodb-version: ["4.2", "4.4", "5.0"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

# mongodb setup
- name: Start MongoDB
Expand All @@ -41,7 +41,7 @@ jobs:

# node.js setup
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
Expand Down
13 changes: 9 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ process.env = Object.assign({
USERS_BCRYPT_SALT_ROUNDS: "12",
USERS_JWT_SECRET: "",
USERS_JWT_ALGORITHM: "HS384",
MQTT_BROKER_VERSION: "3",
MQTT_BROKER_VERSION: "4",
MQTT_CLIENT_ID: "OpenHaus",
MQTT_PING_INTERVAL: "5000"
}, env.parsed, process.env);
Expand Down Expand Up @@ -253,7 +253,7 @@ const starter = new Promise((resolve) => {

} catch (err) {

logger.warn(`Could not boot plugin "${plugin.name}" (${plugin.uuid})`);
logger.error(err, `Could not boot plugin "${plugin.name}" (${plugin.uuid})`);

}
});
Expand All @@ -266,8 +266,13 @@ const starter = new Promise((resolve) => {

logger.info("Startup complete");

process.once("SIGINT", () => {
logger.warn("Shuting down...");
// fix #435
["SIGINT", /*"SIGTERM", "SIGQUIT"*/].forEach((signal) => {
process.once(signal, () => {

logger.warn("Shuting down...");

});
});

});
Loading

0 comments on commit 5a09bf3

Please sign in to comment.