🔨 Migrate to yarn

This commit is contained in:
SebClem 2022-05-01 14:13:21 +02:00
parent 0d2698bcc6
commit 8809965933
Signed by: sebclem
GPG Key ID: 5A4308F6A359EA50
6 changed files with 1456 additions and 2945 deletions

View File

@ -1,5 +1,4 @@
ARG BUILD_FROM=hassioaddons/base:8.0.1 ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64:11.1.2
# hadolint ignore=DL3006
FROM ${BUILD_FROM} FROM ${BUILD_FROM}
# Copy root filesystem # Copy root filesystem
@ -8,16 +7,19 @@ COPY rootfs/usr /usr/
# Setup base # Setup base
RUN apk add --no-cache \ RUN apk add --no-cache \
nodejs \ nodejs-current
npm
# Copy only package*.json # Copy only package*.json
COPY rootfs/opt/nextcloud_backup/package*.json /opt/nextcloud_backup/ COPY rootfs/opt/nextcloud_backup/package*.json /opt/nextcloud_backup/
COPY rootfs/opt/nextcloud_backup/.yarnrc.yml /opt/nextcloud_backup/
WORKDIR /opt/nextcloud_backup/ WORKDIR /opt/nextcloud_backup/
# Enable Yarn
RUN corepack enable
# Install packages # Install packages
RUN npm ci --only=production RUN yarn install
# Copy all source code # Copy all source code
COPY rootfs/opt/ /opt/ COPY rootfs/opt/ /opt/

View File

@ -0,0 +1 @@
nodeLinker: node-modules

File diff suppressed because it is too large Load Diff

View File

@ -23,5 +23,6 @@
"morgan": "~1.10.0", "morgan": "~1.10.0",
"webdav": "^4.8.0", "webdav": "^4.8.0",
"winston": "^3.6.0" "winston": "^3.6.0"
} },
"packageManager": "yarn@3.2.0"
} }

File diff suppressed because it is too large Load Diff

View File

@ -21,4 +21,4 @@ else
CREATE_BACKUP_TIMEOUT='info' CREATE_BACKUP_TIMEOUT='info'
fi fi
LOG_LEVEL=$LOG_LEVEL CREATE_BACKUP_TIMEOUT=$CREATE_BACKUP_TIMEOUT npm start LOG_LEVEL=$LOG_LEVEL CREATE_BACKUP_TIMEOUT=$CREATE_BACKUP_TIMEOUT yarn start