fix(worker): remount / to /host/root

This commit is contained in:
Stavros 2023-11-26 11:17:11 +02:00
parent 7c967271d7
commit 230ae0a412
4 changed files with 5 additions and 1 deletions

View file

@ -80,6 +80,7 @@ services:
# Dev mode
- ${PWD}/packages/worker/src:/app/packages/worker/src
# Production mode
- /:/host/root:ro
- /proc:/host/proc:ro
- /var/run/docker.sock:/var/run/docker.sock
- ${PWD}/.env:/app/.env

View file

@ -76,6 +76,7 @@ services:
environment:
NODE_ENV: production
volumes:
- /:/host/root:ro
- /proc:/host/proc
- /var/run/docker.sock:/var/run/docker.sock
- ${PWD}/.env:/app/.env

View file

@ -78,6 +78,7 @@ services:
NODE_ENV: production
volumes:
# Core
- /:/host/root:ro
- /proc:/host/proc
- /var/run/docker.sock:/var/run/docker.sock
# App

View file

@ -36,7 +36,8 @@ export class SystemExecutors {
this.logger.error(`Unable to read /host/proc/meminfo: ${e}`);
}
const [disk0] = await si.fsSize();
const disks = await si.fsSize();
const disk0 = disks.find((disk) => disk.mount.startsWith('/host/root'));
return {
cpu: { load: currentLoad },