merge upstream

Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
Zoey
2023-03-18 11:37:05 +01:00
parent 1d9c7b0570
commit 256a068791
24 changed files with 34 additions and 136 deletions

View File

@@ -1,12 +1,10 @@
FROM --platform="$BUILDPLATFORM" alpine:3.17.2 as frontend
COPY global /build/global
COPY frontend /build/frontend
RUN apk upgrade --no-cache && \
apk add --no-cache ca-certificates tzdata \
nodejs yarn git build-base python3
ARG NODE_ENV=production \
NODE_OPTIONS=--openssl-legacy-provider
RUN cd /build/frontend && \
RUN apk add --no-cache ca-certificates nodejs yarn git python3 build-base && \
cd /build/frontend && \
sed -i "s|\"0.0.0\"|\""$(cat ../global/.version)"\"|g" package.json && \
yarn --no-lockfile install && \
yarn --no-lockfile build
@@ -16,13 +14,11 @@ COPY security.txt /build/frontend/dist/.well-known/security.txt
FROM --platform="$BUILDPLATFORM" alpine:3.17.2 as backend
COPY backend /build/backend
COPY global /build/backend/global
RUN apk upgrade --no-cache && \
apk add --no-cache ca-certificates tzdata \
nodejs-current yarn && \
wget https://gobinaries.com/tj/node-prune -O - | sh
ARG NODE_ENV=production \
TARGETARCH
RUN cd /build/backend && \
RUN apk add --no-cache ca-certificates nodejs-current yarn && \
wget https://gobinaries.com/tj/node-prune -O - | sh && \
cd /build/backend && \
sed -i "s|\"0.0.0\"|\""$(cat global/.version)"\"|g" package.json && \
if [ "$TARGETARCH" = "amd64" ]; then \
npm_config_target_platform=linux npm_config_target_arch=x64 yarn install --no-lockfile; \
@@ -32,9 +28,9 @@ RUN cd /build/backend && \
node-prune
FROM zoeyvid/nginx-quic:87
RUN apk upgrade --no-cache && \
apk add --no-cache ca-certificates tzdata \
FROM zoeyvid/nginx-quic:95
RUN apk add --no-cache \
ca-certificates tzdata \
nodejs-current \
openssl apache2-utils \
coreutils grep jq curl \
@@ -49,7 +45,8 @@ COPY --from=backend /build/backend /app
COPY --from=frontend /build/frontend/dist /app/frontend
RUN ln -s /app/password-reset.js /usr/local/bin/password-reset.js && \
ln -s /app/sqlite-vaccum.js /usr/local/bin/sqlite-vaccum.js
ln -s /app/sqlite-vaccum.js /usr/local/bin/sqlite-vaccum.js && \
ln -s /app/index.js /usr/local/bin/index.js
ENV NODE_ENV=production \
DB_SQLITE_FILE=/data/database.sqlite