updates for ARM

This commit is contained in:
Andras Bacsai 2022-04-01 14:25:55 +02:00
parent 4946ca2d91
commit f56361c0ca
4 changed files with 44 additions and 307 deletions

View File

@ -1,29 +1,41 @@
FROM node:17-alpine
RUN apk add --no-cache g++ cmake make python3
FROM node:16.14.2-alpine as install
WORKDIR /app
COPY package*.json .
RUN yarn install
COPY . .
RUN yarn build
FROM node:17-alpine
WORKDIR /app
FROM rust:1.58.1-alpine3.14 as prisma
WORKDIR /prisma
ENV RUSTFLAGS="-C target-feature=-crt-static"
RUN apk --no-cache add openssl direnv git musl-dev openssl-dev build-base perl protoc
RUN git clone --depth=1 --branch=3.11.x https://github.com/prisma/prisma-engines.git /prisma
RUN cargo build --release
FROM node:16.14.2-alpine
ARG TARGETPLATFORM
LABEL coolify.managed true
RUN apk add --no-cache git openssh-client curl jq cmake sqlite
WORKDIR /app
ENV PRISMA_QUERY_ENGINE_BINARY=/app/prisma-engines/query-engine \
PRISMA_MIGRATION_ENGINE_BINARY=/app/prisma-engines/migration-engine \
PRISMA_INTROSPECTION_ENGINE_BINARY=/app/prisma-engines/introspection-engine \
PRISMA_FMT_BINARY=/app/prisma-engines/prisma-fmt \
PRISMA_CLI_QUERY_ENGINE_TYPE=binary \
PRISMA_CLIENT_ENGINE_TYPE=binary
COPY --from=prisma /prisma/target/release/query-engine /prisma/target/release/migration-engine /prisma/target/release/introspection-engine /prisma/target/release/prisma-fmt /app/prisma-engines/
COPY --from=install /app/node_modules ./node_modules
COPY . .
RUN apk add --no-cache git openssh-client curl jq sqlite
RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@6
RUN pnpm add -g pnpm
RUN mkdir -p ~/.docker/cli-plugins/
RUN curl -SL https://cdn.coollabs.io/bin/docker-20.10.9-$TARGETPLATFORM -o /usr/bin/docker
RUN curl -SL https://cdn.coollabs.io/bin/docker-compose-linux-2.3.4-$TARGETPLATFORM -o ~/.docker/cli-plugins/docker-compose
RUN curl -SL https://cdn.coollabs.io/bin/$TARGETPLATFORM/docker-20.10.9 -o /usr/bin/docker
RUN curl -SL https://cdn.coollabs.io/bin/$TARGETPLATFORM/docker-compose-linux-2.3.4 -o ~/.docker/cli-plugins/docker-compose
RUN chmod +x ~/.docker/cli-plugins/docker-compose /usr/bin/docker
COPY --from=0 /app/docker-compose.yaml .
COPY --from=0 /app/build .
COPY --from=0 /app/package.json .
COPY --from=0 /app/node_modules ./node_modules
COPY --from=0 /app/prisma ./prisma
RUN pnpm build
EXPOSE 3000
CMD ["pnpm", "start"]

View File

@ -28,7 +28,6 @@
"devDependencies": {
"@sveltejs/adapter-node": "1.0.0-next.73",
"@sveltejs/kit": "1.0.0-next.303",
"@types/bcrypt": "5.0.0",
"@types/js-cookie": "3.0.1",
"@types/js-yaml": "^4.0.5",
"@types/node": "17.0.23",
@ -62,7 +61,7 @@
"@iarna/toml": "2.2.5",
"@prisma/client": "3.11.1",
"@sentry/node": "6.19.2",
"bcrypt": "5.0.1",
"bcryptjs": "^2.4.3",
"bullmq": "1.78.1",
"compare-versions": "4.1.3",
"cookie": "0.4.2",

302
pnpm-lock.yaml generated
View File

@ -6,7 +6,6 @@ specifiers:
'@sentry/node': 6.19.2
'@sveltejs/adapter-node': 1.0.0-next.73
'@sveltejs/kit': 1.0.0-next.303
'@types/bcrypt': 5.0.0
'@types/js-cookie': 3.0.1
'@types/js-yaml': ^4.0.5
'@types/node': 17.0.23
@ -15,7 +14,7 @@ specifiers:
'@typescript-eslint/parser': 4.31.1
'@zerodevx/svelte-toast': 0.7.1
autoprefixer: 10.4.4
bcrypt: 5.0.1
bcryptjs: ^2.4.3
bullmq: 1.78.1
compare-versions: 4.1.3
cookie: 0.4.2
@ -59,7 +58,7 @@ dependencies:
'@iarna/toml': 2.2.5
'@prisma/client': 3.11.1_prisma@3.11.1
'@sentry/node': 6.19.2
bcrypt: 5.0.1
bcryptjs: 2.4.3
bullmq: 1.78.1
compare-versions: 4.1.3
cookie: 0.4.2
@ -83,7 +82,6 @@ dependencies:
devDependencies:
'@sveltejs/adapter-node': 1.0.0-next.73
'@sveltejs/kit': 1.0.0-next.303_svelte@3.46.4
'@types/bcrypt': 5.0.0
'@types/js-cookie': 3.0.1
'@types/js-yaml': 4.0.5
'@types/node': 17.0.23
@ -208,26 +206,6 @@ packages:
}
dev: false
/@mapbox/node-pre-gyp/1.0.6:
resolution:
{
integrity: sha512-qK1ECws8UxuPqOA8F5LFD90vyVU33W7N3hGfgsOVfrJaRVc8McC3JClTDHpeSbL9CBrOHly/4GsNPAvIgNZE+g==
}
hasBin: true
dependencies:
detect-libc: 1.0.3
https-proxy-agent: 5.0.0
make-dir: 3.1.0
node-fetch: 2.6.6
nopt: 5.0.0
npmlog: 5.0.1
rimraf: 3.0.2
semver: 7.3.5
tar: 6.1.11
transitivePeerDependencies:
- supports-color
dev: false
/@nodelib/fs.scandir/2.1.5:
resolution:
{
@ -480,15 +458,6 @@ packages:
}
dev: true
/@types/bcrypt/5.0.0:
resolution:
{
integrity: sha512-agtcFKaruL8TmcvqbndlqHPSJgsolhf/qPWchFlgnW1gECTN/nKbFcoFnvKAQRFfKbh+BO6A3SWdJu9t+xF3Lw==
}
dependencies:
'@types/node': 17.0.23
dev: true
/@types/cacheable-request/6.0.2:
resolution:
{
@ -718,13 +687,6 @@ packages:
}
dev: true
/abbrev/1.1.1:
resolution:
{
integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
}
dev: false
/acorn-jsx/5.3.2_acorn@7.4.1:
resolution:
{
@ -851,17 +813,13 @@ packages:
engines: { node: '>=0.10.0' }
dev: true
/ansi-regex/3.0.0:
resolution: { integrity: sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= }
engines: { node: '>=4' }
dev: false
/ansi-regex/5.0.1:
resolution:
{
integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
}
engines: { node: '>=8' }
dev: true
/ansi-regex/6.0.1:
resolution:
@ -915,24 +873,6 @@ packages:
picomatch: 2.3.0
dev: true
/aproba/2.0.0:
resolution:
{
integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==
}
dev: false
/are-we-there-yet/2.0.0:
resolution:
{
integrity: sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==
}
engines: { node: '>=10' }
dependencies:
delegates: 1.0.0
readable-stream: 3.6.0
dev: false
/arg/4.1.3:
resolution:
{
@ -1652,18 +1592,8 @@ packages:
tweetnacl: 0.14.5
dev: false
/bcrypt/5.0.1:
resolution:
{
integrity: sha512-9BTgmrhZM2t1bNuDtrtIMVSmmxZBrJ71n8Wg+YgdjHuIWYF7SjjmCPZFB+/5i/o/PIeRpwVJR3P+NrpIItUjqw==
}
engines: { node: '>= 10.0.0' }
requiresBuild: true
dependencies:
'@mapbox/node-pre-gyp': 1.0.6
node-addon-api: 3.2.1
transitivePeerDependencies:
- supports-color
/bcryptjs/2.4.3:
resolution: { integrity: sha1-mrVie5PmBiH/fNrF2pczAn3x0Ms= }
dev: false
/binary-extensions/2.2.0:
@ -1870,14 +1800,6 @@ packages:
}
dev: false
/chownr/2.0.0:
resolution:
{
integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==
}
engines: { node: '>=10' }
dev: false
/clean-stack/2.2.0:
resolution:
{
@ -1962,14 +1884,6 @@ packages:
}
dev: true
/color-support/1.1.3:
resolution:
{
integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==
}
hasBin: true
dev: false
/colorette/2.0.16:
resolution:
{
@ -1995,10 +1909,6 @@ packages:
/concat-map/0.0.1:
resolution: { integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= }
/console-control-strings/1.1.0:
resolution: { integrity: sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= }
dev: false
/convert-source-map/1.8.0:
resolution:
{
@ -2202,10 +2112,6 @@ packages:
resolution: { integrity: sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= }
dev: true
/delegates/1.0.0:
resolution: { integrity: sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= }
dev: false
/denque/1.5.1:
resolution:
{
@ -2229,12 +2135,6 @@ packages:
engines: { node: '>=8' }
dev: true
/detect-libc/1.0.3:
resolution: { integrity: sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= }
engines: { node: '>=0.10' }
hasBin: true
dev: false
/detective/5.2.0:
resolution:
{
@ -2368,6 +2268,7 @@ packages:
{
integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
}
dev: true
/emoji-regex/9.2.2:
resolution:
@ -3010,16 +2911,6 @@ packages:
}
dev: false
/fs-minipass/2.1.0:
resolution:
{
integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==
}
engines: { node: '>= 8' }
dependencies:
minipass: 3.1.5
dev: false
/fs.realpath/1.0.0:
resolution: { integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8= }
@ -3054,24 +2945,6 @@ packages:
resolution: { integrity: sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= }
dev: true
/gauge/3.0.1:
resolution:
{
integrity: sha512-6STz6KdQgxO4S/ko+AbjlFGGdGcknluoqU+79GOFCDqqyYj5OanQf9AjxwN0jCidtT+ziPMmPSt9E4hfQ0CwIQ==
}
engines: { node: '>=10' }
dependencies:
aproba: 2.0.0
color-support: 1.1.3
console-control-strings: 1.1.0
has-unicode: 2.0.1
object-assign: 4.1.1
signal-exit: 3.0.5
string-width: 2.1.1
strip-ansi: 4.0.0
wide-align: 1.1.5
dev: false
/generate-password/1.7.0:
resolution:
{
@ -3241,10 +3114,6 @@ packages:
engines: { node: '>=8' }
dev: true
/has-unicode/2.0.1:
resolution: { integrity: sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= }
dev: false
/has/1.0.3:
resolution:
{
@ -3457,17 +3326,13 @@ packages:
engines: { node: '>=0.10.0' }
dev: true
/is-fullwidth-code-point/2.0.0:
resolution: { integrity: sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= }
engines: { node: '>=4' }
dev: false
/is-fullwidth-code-point/3.0.0:
resolution:
{
integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
}
engines: { node: '>=8' }
dev: true
/is-fullwidth-code-point/4.0.0:
resolution:
@ -3839,6 +3704,7 @@ packages:
engines: { node: '>=10' }
dependencies:
yallist: 4.0.0
dev: true
/lru_map/0.3.3:
resolution: { integrity: sha1-tcg1G5Rky9dQM1p5ZQoOwOVhGN0= }
@ -3860,16 +3726,6 @@ packages:
sourcemap-codec: 1.4.8
dev: true
/make-dir/3.1.0:
resolution:
{
integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==
}
engines: { node: '>=8' }
dependencies:
semver: 6.3.0
dev: false
/make-error/1.3.6:
resolution:
{
@ -3950,27 +3806,6 @@ packages:
}
dev: true
/minipass/3.1.5:
resolution:
{
integrity: sha512-+8NzxD82XQoNKNrl1d/FSi+X8wAEWR+sbYAfIvub4Nz0d22plFG72CEVVaufV8PNf4qSslFTD8VMOxNVhHCjTw==
}
engines: { node: '>=8' }
dependencies:
yallist: 4.0.0
dev: false
/minizlib/2.1.2:
resolution:
{
integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==
}
engines: { node: '>= 8' }
dependencies:
minipass: 3.1.5
yallist: 4.0.0
dev: false
/mkdirp-classic/0.5.3:
resolution:
{
@ -3988,15 +3823,6 @@ packages:
minimist: 1.2.5
dev: true
/mkdirp/1.0.4:
resolution:
{
integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
}
engines: { node: '>=10' }
hasBin: true
dev: false
/mri/1.2.0:
resolution:
{
@ -4065,23 +3891,6 @@ packages:
resolution: { integrity: sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= }
dev: true
/node-addon-api/3.2.1:
resolution:
{
integrity: sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==
}
dev: false
/node-fetch/2.6.6:
resolution:
{
integrity: sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==
}
engines: { node: 4.x || >=6.0.0 }
dependencies:
whatwg-url: 5.0.0
dev: false
/node-forge/1.3.0:
resolution:
{
@ -4113,17 +3922,6 @@ packages:
}
dev: false
/nopt/5.0.0:
resolution:
{
integrity: sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==
}
engines: { node: '>=6' }
hasBin: true
dependencies:
abbrev: 1.1.1
dev: false
/normalize-path/3.0.0:
resolution:
{
@ -4155,23 +3953,6 @@ packages:
path-key: 3.1.1
dev: true
/npmlog/5.0.1:
resolution:
{
integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==
}
dependencies:
are-we-there-yet: 2.0.0
console-control-strings: 1.1.0
gauge: 3.0.1
set-blocking: 2.0.0
dev: false
/object-assign/4.1.1:
resolution: { integrity: sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= }
engines: { node: '>=0.10.0' }
dev: false
/object-hash/2.2.0:
resolution:
{
@ -4706,6 +4487,7 @@ packages:
hasBin: true
dependencies:
glob: 7.2.0
dev: true
/rollup/2.61.1:
resolution:
@ -4801,10 +4583,7 @@ packages:
hasBin: true
dependencies:
lru-cache: 6.0.0
/set-blocking/2.0.0:
resolution: { integrity: sha1-BF+XgtARrppoA93TgrJDkrPYkPc= }
dev: false
dev: true
/shebang-command/1.2.0:
resolution: { integrity: sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= }
@ -4839,6 +4618,7 @@ packages:
{
integrity: sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==
}
dev: true
/slash/1.0.0:
resolution: { integrity: sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= }
@ -4973,17 +4753,6 @@ packages:
engines: { node: '>=0.6.19' }
dev: true
/string-width/2.1.1:
resolution:
{
integrity: sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==
}
engines: { node: '>=4' }
dependencies:
is-fullwidth-code-point: 2.0.0
strip-ansi: 4.0.0
dev: false
/string-width/4.2.3:
resolution:
{
@ -4994,6 +4763,7 @@ packages:
emoji-regex: 8.0.0
is-fullwidth-code-point: 3.0.0
strip-ansi: 6.0.1
dev: true
/string-width/5.1.0:
resolution:
@ -5023,13 +4793,6 @@ packages:
ansi-regex: 2.1.1
dev: true
/strip-ansi/4.0.0:
resolution: { integrity: sha1-qEeQIusaw2iocTibY1JixQXuNo8= }
engines: { node: '>=4' }
dependencies:
ansi-regex: 3.0.0
dev: false
/strip-ansi/6.0.1:
resolution:
{
@ -5038,6 +4801,7 @@ packages:
engines: { node: '>=8' }
dependencies:
ansi-regex: 5.0.1
dev: true
/strip-ansi/7.0.1:
resolution:
@ -5324,21 +5088,6 @@ packages:
readable-stream: 3.6.0
dev: false
/tar/6.1.11:
resolution:
{
integrity: sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==
}
engines: { node: '>= 10' }
dependencies:
chownr: 2.0.0
fs-minipass: 2.1.0
minipass: 3.1.5
minizlib: 2.1.2
mkdirp: 1.0.4
yallist: 4.0.0
dev: false
/text-table/0.2.0:
resolution: { integrity: sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= }
dev: true
@ -5372,10 +5121,6 @@ packages:
is-number: 7.0.0
dev: true
/tr46/0.0.3:
resolution: { integrity: sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= }
dev: false
/trim-right/1.0.1:
resolution: { integrity: sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= }
engines: { node: '>=0.10.0' }
@ -5558,17 +5303,6 @@ packages:
fsevents: 2.3.2
dev: true
/webidl-conversions/3.0.1:
resolution: { integrity: sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= }
dev: false
/whatwg-url/5.0.0:
resolution: { integrity: sha1-lmRU6HZUYuN2RNNib2dCzotwll0= }
dependencies:
tr46: 0.0.3
webidl-conversions: 3.0.1
dev: false
/which/1.3.1:
resolution:
{
@ -5589,15 +5323,6 @@ packages:
dependencies:
isexe: 2.0.0
/wide-align/1.1.5:
resolution:
{
integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==
}
dependencies:
string-width: 4.2.3
dev: false
/word-wrap/1.2.3:
resolution:
{
@ -5650,6 +5375,7 @@ packages:
{
integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
}
dev: true
/yaml/1.10.2:
resolution:

View File

@ -1,5 +1,5 @@
import cuid from 'cuid';
import bcrypt from 'bcrypt';
import bcrypt from 'bcryptjs';
import { prisma } from './common';
import { asyncExecShell, uniqueName } from '$lib/common';