fix builds

This commit is contained in:
JandereDev 2022-07-09 07:18:03 +02:00
parent b8f66a6aa6
commit a5b7ce4d49
Signed by: Lea
GPG key ID: 5D5E18ACB990F57A
6 changed files with 49 additions and 17 deletions

View file

@ -1,13 +1,15 @@
FROM node:16 as build FROM node:16 as build
WORKDIR /build/ WORKDIR /build/
COPY package.json yarn.lock ./ COPY package.json yarn.lock .yarnrc.yml ./
RUN yarn install --frozen-lockfile COPY .yarn ./.yarn
RUN yarn install --immutable
COPY . . COPY . .
RUN yarn build RUN yarn build
FROM node:16 as prod FROM node:16 as prod
WORKDIR /app/ WORKDIR /app/
COPY --from=build /build/package.json /build/yarn.lock ./ COPY --from=build /build/package.json /build/yarn.lock /build/.yarnrc.yml ./
COPY --from=build /build/.yarn ./.yarn
COPY --from=build /build/dist ./dist COPY --from=build /build/dist ./dist
RUN yarn install --production --frozen-lockfile RUN yarn install --immutable
CMD ["yarn", "start"] CMD ["yarn", "start"]

View file

@ -1,13 +1,15 @@
FROM node:16 as build FROM node:16 as build
WORKDIR /build/ WORKDIR /build/
COPY package.json yarn.lock ./ COPY package.json yarn.lock .yarnrc.yml ./
RUN yarn install --frozen-lockfile COPY .yarn ./.yarn
RUN yarn install --immutable
COPY . . COPY . .
RUN yarn build RUN yarn build
FROM node:16 as prod FROM node:16 as prod
WORKDIR /app/ WORKDIR /app/
COPY --from=build /build/package.json /build/yarn.lock ./ COPY --from=build /build/package.json /build/yarn.lock /build/.yarnrc.yml ./
COPY --from=build /build/.yarn ./.yarn
COPY --from=build /build/dist ./dist COPY --from=build /build/dist ./dist
RUN yarn install --production --frozen-lockfile RUN yarn install --immutable
CMD ["yarn", "start"] CMD ["yarn", "start"]

View file

@ -1,13 +1,15 @@
FROM node:16 as build FROM node:16 as build
WORKDIR /build/ WORKDIR /build/
COPY package.json yarn.lock ./ COPY package.json yarn.lock .yarnrc.yml ./
RUN yarn install --frozen-lockfile COPY .yarn ./.yarn
RUN yarn install --immutable
COPY . . COPY . .
RUN yarn build RUN yarn build
FROM node:16 as prod FROM node:16 as prod
WORKDIR /app/ WORKDIR /app/
COPY --from=build /build/package.json /build/yarn.lock ./ COPY --from=build /build/package.json /build/yarn.lock /build/.yarnrc.yml ./
COPY --from=build /build/.yarn ./.yarn
COPY --from=build /build/dist ./dist COPY --from=build /build/dist ./dist
RUN yarn install --production --frozen-lockfile RUN yarn install --immutable
CMD ["yarn", "start"] CMD ["yarn", "start"]

View file

@ -28,5 +28,8 @@
"smart-replace": "^1.0.2", "smart-replace": "^1.0.2",
"ulid": "^2.3.0" "ulid": "^2.3.0"
}, },
"packageManager": "yarn@3.2.1" "packageManager": "yarn@3.2.1",
"devDependencies": {
"typescript": "^4.7.4"
}
} }

View file

@ -266,6 +266,7 @@ __metadata:
prom-client: ^14.0.1 prom-client: ^14.0.1
revolt-api: ^0.5.3-rc.8 revolt-api: ^0.5.3-rc.8
smart-replace: ^1.0.2 smart-replace: ^1.0.2
typescript: ^4.7.4
ulid: ^2.3.0 ulid: ^2.3.0
languageName: unknown languageName: unknown
linkType: soft linkType: soft
@ -863,6 +864,16 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"typescript@npm:^4.7.4":
version: 4.7.4
resolution: "typescript@npm:4.7.4"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 5750181b1cd7e6482c4195825547e70f944114fb47e58e4aa7553e62f11b3f3173766aef9c281783edfd881f7b8299cf35e3ca8caebe73d8464528c907a164df
languageName: node
linkType: hard
"typescript@patch:typescript@^4.6.2#~builtin<compat/typescript>": "typescript@patch:typescript@^4.6.2#~builtin<compat/typescript>":
version: 4.6.3 version: 4.6.3
resolution: "typescript@patch:typescript@npm%3A4.6.3#~builtin<compat/typescript>::version=4.6.3&hash=7ad353" resolution: "typescript@patch:typescript@npm%3A4.6.3#~builtin<compat/typescript>::version=4.6.3&hash=7ad353"
@ -873,6 +884,16 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"typescript@patch:typescript@^4.7.4#~builtin<compat/typescript>":
version: 4.7.4
resolution: "typescript@patch:typescript@npm%3A4.7.4#~builtin<compat/typescript>::version=4.7.4&hash=7ad353"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 9096d8f6c16cb80ef3bf96fcbbd055bf1c4a43bd14f3b7be45a9fbe7ada46ec977f604d5feed3263b4f2aa7d4c7477ce5f9cd87de0d6feedec69a983f3a4f93e
languageName: node
linkType: hard
"ulid@npm:^2.3.0": "ulid@npm:^2.3.0":
version: 2.3.0 version: 2.3.0
resolution: "ulid@npm:2.3.0" resolution: "ulid@npm:2.3.0"

View file

@ -2,15 +2,17 @@ FROM node:16 as build
ARG VITE_API_URL ARG VITE_API_URL
ARG VITE_BOT_PREFIX ARG VITE_BOT_PREFIX
WORKDIR /build/ WORKDIR /build/
COPY package.json yarn.lock ./ COPY package.json yarn.lock .yarnrc.yml ./
RUN yarn install --frozen-lockfile COPY .yarn ./.yarn
RUN yarn install --immutable
COPY . . COPY . .
RUN yarn build RUN yarn build
FROM node:16 as prod FROM node:16 as prod
WORKDIR /app/ WORKDIR /app/
COPY --from=build /build/package.json /build/yarn.lock ./ COPY --from=build /build/package.json /build/yarn.lock /build/.yarnrc.yml ./
COPY --from=build /build/.yarn ./.yarn
COPY --from=build /build/dist ./dist COPY --from=build /build/dist ./dist
RUN yarn add --production --frozen-lockfile vite RUN yarn add vite
# Running this with bash -c because it won't exit on ctrl+c otherwise # Running this with bash -c because it won't exit on ctrl+c otherwise
CMD ["bash", "-c", "yarn preview --port=80 --strictPort=true --clearScreen=false --host"] CMD ["bash", "-c", "yarn preview --port=80 --strictPort=true --clearScreen=false --host"]