From 40ae859c8ee98a79d2d948c622177ef399ca2f8f Mon Sep 17 00:00:00 2001 From: Andrey Sitnik Date: Thu, 13 Mar 2025 19:32:53 +0100 Subject: [PATCH 1/8] Collect debug data --- .github/workflows/server.yml | 2 +- server/Dockerfile | 14 +------------- server/db/index.ts | 4 +++- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml index d5fab4ab..5e88529c 100644 --- a/.github/workflows/server.yml +++ b/.github/workflows/server.yml @@ -90,7 +90,7 @@ jobs: folder: ./server/ registry: staging/server service: staging-server - env: ASSETS=,PROXY_ORIGIN=,DATABASE_URL=dump:/var/mnt/db/db.pglite + env: ASSETS=,PROXY_ORIGIN=,DATABASE_URL=file:///var/mnt/db/pgdata # Persistent database was disable temporary to save money # flags: | # --vpc-connector db-connector diff --git a/server/Dockerfile b/server/Dockerfile index 955ef58a..d7c38e93 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,16 +1,4 @@ -# syntax=docker/dockerfile:1.6 -FROM registry.access.redhat.com/ubi9/ubi:9.5 as builder - -ENV NODE_VERSION 22.14.0 -ENV NODE_CHECKSUM sha256:9d942932535988091034dc94cc5f42b6dc8784d6366df3a36c4c9ccb3996f0c2 - -ADD --checksum=$NODE_CHECKSUM https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz /node.tar.gz -RUN tar --remove-files -C /usr/local/ -xz --strip-components=1 -f /node.tar.gz - -FROM registry.access.redhat.com/ubi9/ubi-micro:9.5 - -COPY --from=builder /usr/local/bin/node /usr/bin/node -COPY --from=builder /usr/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so.6 +FROM node:22.14.0-alpine ENV NODE_ENV production ENV LOGUX_HOST 0.0.0.0 diff --git a/server/db/index.ts b/server/db/index.ts index b5aff2e8..64330de7 100644 --- a/server/db/index.ts +++ b/server/db/index.ts @@ -41,7 +41,9 @@ if ( } setInterval(dumpDb, 60 * 60 * 1000) } else { - pglite = new PGlite(config.db) + // eslint-disable-next-line no-console + console.log('DB Location:', config.db) + pglite = new PGlite(config.db, { debug: 1 }) } let drizzlePglite = devDrizzle(pglite, { schema }) await devMigrate(drizzlePglite, MIGRATE_CONFIG) From 2173ecb2103d467b6142df563f045d0351d58570 Mon Sep 17 00:00:00 2001 From: Andrey Sitnik Date: Sun, 16 Mar 2025 15:55:43 +0100 Subject: [PATCH 2/8] Use alpine for all images --- .devcontainer/Dockerfile | 14 +++++++------- proxy/Dockerfile | 16 ++++++---------- scripts/update-env.ts | 31 ++++++++++++++++++------------- server/Dockerfile | 10 +++++++++- 4 files changed, 40 insertions(+), 31 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index e9529bc3..15042d17 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -8,9 +8,9 @@ ARG TARGETARCH ENV NODE_VERSION 22.14.0 ENV PNPM_VERSION 10.6.5 -ENV NODE_CHECKSUM_ARM64 8cf30ff7250f9463b53c18f89c6c606dfda70378215b2c905d0a9a8b08bd45e0 +ENV NODE_CHECKSUM_ARM64 69b09dba5c8dcb05c4e4273a4340db1005abeafe3927efda2bc5b249e80437ec ENV PNPM_CHECKSUM_ARM64 9b9d1d3f026f969b33596dbf6c46f31a8078f0fce412231b2093d7e6a36aaa5c -ENV NODE_CHECKSUM_X64 9d942932535988091034dc94cc5f42b6dc8784d6366df3a36c4c9ccb3996f0c2 +ENV NODE_CHECKSUM_X64 69b09dba5c8dcb05c4e4273a4340db1005abeafe3927efda2bc5b249e80437ec ENV PNPM_CHECKSUM_X64 75a7f1c70d3ce7ff7f6f0a0815010246ff14142418f66126a2c2be83a65f284d RUN apt-get update \ @@ -37,9 +37,9 @@ RUN < +type Architectures = { arm64: string; musl?: string; x64: string } async function getLatestNodeVersion(major: string): Promise { let response = await fetch('https://nodejs.org/dist/index.json') @@ -31,20 +29,27 @@ async function getLatestPnpmVersion(): Promise { } async function getNodeSha256(version: string): Promise { - let response = await fetch( - `https://nodejs.org/dist/v${version}/SHASUMS256.txt` - ) - let data = await response.text() - let lines = data.split('\n') + let [official, unofficial] = await Promise.all([ + fetch(`https://nodejs.org/dist/v${version}/SHASUMS256.txt`), + fetch( + `https://unofficial-builds.nodejs.org/download/release/v${version}/SHASUMS256.txt` + ) + ]) + let [officialText, unofficialText] = await Promise.all([ + official.text(), + unofficial.text() + ]) + let lines = officialText.split('\n').concat(unofficialText.split('\n')) return { - arm64: lines.find(i => i.endsWith('-linux-arm64.tar.gz'))!.split(' ')[0]!, - x64: lines.find(i => i.endsWith('-linux-x64.tar.gz'))!.split(' ')[0]! + arm64: lines.find(i => i.endsWith('-linux-x64.tar.xz'))!.split(' ')[0]!, + musl: lines.find(i => i.endsWith('-linux-x64-musl.tar.xz'))!.split(' ')[0]!, + x64: lines.find(i => i.endsWith('-linux-x64.tar.xz'))!.split(' ')[0]! } } async function getPnpmSha256( version: string, - arch: Architecture + arch: 'arm64' | 'x64' ): Promise { let binary = await fetch( 'https://github.com/pnpm/pnpm/releases/download/' + @@ -99,8 +104,8 @@ function replaceVersionEnv( let name = `${tool}_CHECKSUM_${arch.toUpperCase()}` fixed = replaceEnv(fixed, name, checksum) } - } else if (content.includes('_CHECKSUM ')) { - fixed = replaceEnv(fixed, `${tool}_CHECKSUM`, 'sha256:' + checksums.x64) + } else if (content.includes('_CHECKSUM ') && checksums.musl) { + fixed = replaceEnv(fixed, `${tool}_CHECKSUM`, 'sha256:' + checksums.musl) } return fixed } diff --git a/server/Dockerfile b/server/Dockerfile index d7c38e93..3bd01f60 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,4 +1,12 @@ -FROM node:22.14.0-alpine +FROM alpine:3.21.3 + +ENV NODE_VERSION 22.14.0 +ENV NODE_CHECKSUM sha256:87f163387ac85df69df6eeb863a6b6a1aa789b49cda1c495871c0fe360634db3 + +ADD --checksum=$NODE_CHECKSUM https://unofficial-builds.nodejs.org/download/release/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64-musl.tar.xz /node.tar.xz +RUN tar -xf "node.tar.xz" --strip-components=1 -C /usr/local/ \ + "node-v${NODE_VERSION}-linux-x64-musl/bin/node" && rm "node.tar.xz" +RUN apk add --no-cache libstdc++ ENV NODE_ENV production ENV LOGUX_HOST 0.0.0.0 From da566a2c9faeebffb8b5200f77a00b1712f64e1f Mon Sep 17 00:00:00 2001 From: Andrey Sitnik Date: Tue, 18 Mar 2025 20:12:10 +0100 Subject: [PATCH 3/8] Add a way to track container image size --- proxy/scripts/run-image.sh | 4 ++++ server/scripts/run-image.sh | 4 ++++ web/scripts/run-image.sh | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/proxy/scripts/run-image.sh b/proxy/scripts/run-image.sh index 895663f8..53f4af81 100755 --- a/proxy/scripts/run-image.sh +++ b/proxy/scripts/run-image.sh @@ -2,6 +2,7 @@ # Use Podman instead of Docker if it is avaiable to run image in production mode ERROR='\033[0;31m' +WARNING='\033[0;33m' NC='\033[0m' # No Color command_exists() { @@ -10,6 +11,9 @@ command_exists() { build_and_run() { IMAGE_ID=$($1 build . | tail -1) + SIZE=$($1 image inspect "$IMAGE_ID" --format='{{.Size}}' | \ + awk '{printf "%d MB", $1/1024/1024}') + echo -e "${WARNING}Image size: ${SIZE}${NC}" $1 run --rm -p 5284:5284 \ -e PORT=5284 -e PROXY_ORIGIN=^http:\\/\\/localhost:5173$ \ -it $IMAGE_ID diff --git a/server/scripts/run-image.sh b/server/scripts/run-image.sh index 3c16a977..bd51ae74 100755 --- a/server/scripts/run-image.sh +++ b/server/scripts/run-image.sh @@ -2,6 +2,7 @@ # Use Podman instead of Docker if it is avaiable to run image in production mode ERROR='\033[0;31m' +WARNING='\033[0;33m' NC='\033[0m' # No Color command_exists() { @@ -10,6 +11,9 @@ command_exists() { build_and_run() { IMAGE_ID=$($1 build . | tail -1) + SIZE=$($1 image inspect "$IMAGE_ID" --format='{{.Size}}' | \ + awk '{printf "%d MB", $1/1024/1024}') + echo -e "${WARNING}Image size: ${SIZE}${NC}" $1 run --rm -p 31337:31337 \ -e DATABASE_URL=memory:// -e ASSETS=1 \ -it $IMAGE_ID diff --git a/web/scripts/run-image.sh b/web/scripts/run-image.sh index 050f8384..614cba5c 100755 --- a/web/scripts/run-image.sh +++ b/web/scripts/run-image.sh @@ -2,6 +2,7 @@ # Use Podman instead of Docker if it is avaiable to run image in production mode ERROR='\033[0;31m' +WARNING='\033[0;33m' OK='\033[1;32m' NC='\033[0m' # No Color @@ -11,6 +12,9 @@ command_exists() { build_and_run() { IMAGE_ID=$($1 build . | tail -1) + SIZE=$($1 image inspect "$IMAGE_ID" --format='{{.Size}}' | \ + awk '{printf "%d MB", $1/1024/1024}') + echo -e "${WARNING}Image size: ${SIZE}${NC}" echo -e "${OK}Web server is running on http://localhost:8080${NC}" $1 run --rm -p 8080:8080 -e PORT=8080 -it $IMAGE_ID } From 07a5ffb34a110f1e9b65f666343988460c12317e Mon Sep 17 00:00:00 2001 From: Andrey Sitnik Date: Tue, 18 Mar 2025 20:57:14 +0100 Subject: [PATCH 4/8] Better error output in scrips --- proxy/scripts/run-image.sh | 10 ++++++++-- server/scripts/run-image.sh | 10 ++++++++-- web/scripts/run-image.sh | 10 ++++++++-- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/proxy/scripts/run-image.sh b/proxy/scripts/run-image.sh index 53f4af81..ebf4f1f4 100755 --- a/proxy/scripts/run-image.sh +++ b/proxy/scripts/run-image.sh @@ -1,5 +1,7 @@ #!/bin/bash -# Use Podman instead of Docker if it is avaiable to run image in production mode +# Test real production environment with Podman or Docker + +set -e ERROR='\033[0;31m' WARNING='\033[0;33m' @@ -10,7 +12,11 @@ command_exists() { } build_and_run() { - IMAGE_ID=$($1 build . | tail -1) + BUILD_OUTPUT=$($1 build . 2>&1) || { + echo -e "${ERROR}Build failed:${NC}\n$BUILD_OUTPUT" + exit 1 + } + IMAGE_ID=$(echo "$BUILD_OUTPUT" | tail -1) SIZE=$($1 image inspect "$IMAGE_ID" --format='{{.Size}}' | \ awk '{printf "%d MB", $1/1024/1024}') echo -e "${WARNING}Image size: ${SIZE}${NC}" diff --git a/server/scripts/run-image.sh b/server/scripts/run-image.sh index bd51ae74..bd266b0a 100755 --- a/server/scripts/run-image.sh +++ b/server/scripts/run-image.sh @@ -1,5 +1,7 @@ #!/bin/bash -# Use Podman instead of Docker if it is avaiable to run image in production mode +# Test real production environment with Podman or Docker + +set -e ERROR='\033[0;31m' WARNING='\033[0;33m' @@ -10,7 +12,11 @@ command_exists() { } build_and_run() { - IMAGE_ID=$($1 build . | tail -1) + BUILD_OUTPUT=$($1 build . 2>&1) || { + echo -e "${ERROR}Build failed:${NC}\n$BUILD_OUTPUT" + exit 1 + } + IMAGE_ID=$(echo "$BUILD_OUTPUT" | tail -1) SIZE=$($1 image inspect "$IMAGE_ID" --format='{{.Size}}' | \ awk '{printf "%d MB", $1/1024/1024}') echo -e "${WARNING}Image size: ${SIZE}${NC}" diff --git a/web/scripts/run-image.sh b/web/scripts/run-image.sh index 614cba5c..1f19954c 100755 --- a/web/scripts/run-image.sh +++ b/web/scripts/run-image.sh @@ -1,5 +1,7 @@ #!/bin/bash -# Use Podman instead of Docker if it is avaiable to run image in production mode +# Test real production environment with Podman or Docker + +set -e ERROR='\033[0;31m' WARNING='\033[0;33m' @@ -11,7 +13,11 @@ command_exists() { } build_and_run() { - IMAGE_ID=$($1 build . | tail -1) + BUILD_OUTPUT=$($1 build . 2>&1) || { + echo -e "${ERROR}Build failed:${NC}\n$BUILD_OUTPUT" + exit 1 + } + IMAGE_ID=$(echo "$BUILD_OUTPUT" | tail -1) SIZE=$($1 image inspect "$IMAGE_ID" --format='{{.Size}}' | \ awk '{printf "%d MB", $1/1024/1024}') echo -e "${WARNING}Image size: ${SIZE}${NC}" From 72e2cb84431186cdeda14c9074515c6fc5a3d96a Mon Sep 17 00:00:00 2001 From: Andrey Sitnik Date: Tue, 18 Mar 2025 21:31:20 +0100 Subject: [PATCH 5/8] Reduce code duplication in shell scripts --- proxy/scripts/run-image.sh | 34 ++----------------------- scripts/image-utils.sh | 49 +++++++++++++++++++++++++++++++++++++ server/scripts/run-image.sh | 34 ++----------------------- web/scripts/run-image.sh | 34 ++----------------------- 4 files changed, 55 insertions(+), 96 deletions(-) create mode 100644 scripts/image-utils.sh diff --git a/proxy/scripts/run-image.sh b/proxy/scripts/run-image.sh index ebf4f1f4..ad5f65f8 100755 --- a/proxy/scripts/run-image.sh +++ b/proxy/scripts/run-image.sh @@ -1,35 +1,5 @@ #!/bin/bash # Test real production environment with Podman or Docker -set -e - -ERROR='\033[0;31m' -WARNING='\033[0;33m' -NC='\033[0m' # No Color - -command_exists() { - command -v "$1" >/dev/null 2>&1 -} - -build_and_run() { - BUILD_OUTPUT=$($1 build . 2>&1) || { - echo -e "${ERROR}Build failed:${NC}\n$BUILD_OUTPUT" - exit 1 - } - IMAGE_ID=$(echo "$BUILD_OUTPUT" | tail -1) - SIZE=$($1 image inspect "$IMAGE_ID" --format='{{.Size}}' | \ - awk '{printf "%d MB", $1/1024/1024}') - echo -e "${WARNING}Image size: ${SIZE}${NC}" - $1 run --rm -p 5284:5284 \ - -e PORT=5284 -e PROXY_ORIGIN=^http:\\/\\/localhost:5173$ \ - -it $IMAGE_ID -} - -if command_exists podman; then - build_and_run podman -elif command_exists docker; then - build_and_run docker -else - echo -e "${ERROR}Install Podman or Docker${NC}" - exit 1 -fi +source "$(dirname "$0")/../../scripts/image-utils.sh" +build_and_run 5284 "-e PROXY_ORIGIN=^http:\\/\\/localhost:5173$" diff --git a/scripts/image-utils.sh b/scripts/image-utils.sh new file mode 100644 index 00000000..a5210ce0 --- /dev/null +++ b/scripts/image-utils.sh @@ -0,0 +1,49 @@ +#!/bin/bash +# Common functions for testing production environments with Podman or Docker + +ERROR='\033[0;31m' +WARNING='\033[0;33m' +NC='\033[0m' # No Color + +command_exists() { + command -v "$1" >/dev/null 2>&1 +} + +run_container() { + local container_tool=$1 + local port=$2 + local envs=$3 + local image_id=$4 + + $container_tool run --rm -p "$port:$port" -e PORT=$port $envs -it "$image_id" +} + +build_and_run() { + local port=$1 + local envs=$2 + + # Select container tool (podman or docker) + local tool + if command_exists podman; then + tool="podman" + elif command_exists docker; then + tool="docker" + else + echo -e "${ERROR}Install Podman or Docker${NC}" + exit 1 + fi + + echo "Building image with $tool" + BUILD_OUTPUT=$($tool build . 2>&1) || { + echo -e "${ERROR}Build failed:${NC}\n$BUILD_OUTPUT" + exit 1 + } + IMAGE_ID=$(echo "$BUILD_OUTPUT" | tail -1) + + SIZE=$($tool image inspect "$IMAGE_ID" --format='{{.Size}}' | \ + awk '{printf "%d MB", $1/1024/1024}') + echo -e "${WARNING}Image size: ${SIZE}${NC}" + + run_container "$tool" "$port" "$envs" "$IMAGE_ID" +} + diff --git a/server/scripts/run-image.sh b/server/scripts/run-image.sh index bd266b0a..a600a33a 100755 --- a/server/scripts/run-image.sh +++ b/server/scripts/run-image.sh @@ -1,35 +1,5 @@ #!/bin/bash # Test real production environment with Podman or Docker -set -e - -ERROR='\033[0;31m' -WARNING='\033[0;33m' -NC='\033[0m' # No Color - -command_exists() { - command -v "$1" >/dev/null 2>&1 -} - -build_and_run() { - BUILD_OUTPUT=$($1 build . 2>&1) || { - echo -e "${ERROR}Build failed:${NC}\n$BUILD_OUTPUT" - exit 1 - } - IMAGE_ID=$(echo "$BUILD_OUTPUT" | tail -1) - SIZE=$($1 image inspect "$IMAGE_ID" --format='{{.Size}}' | \ - awk '{printf "%d MB", $1/1024/1024}') - echo -e "${WARNING}Image size: ${SIZE}${NC}" - $1 run --rm -p 31337:31337 \ - -e DATABASE_URL=memory:// -e ASSETS=1 \ - -it $IMAGE_ID -} - -if command_exists podman; then - build_and_run podman -elif command_exists docker; then - build_and_run docker -else - echo -e "${ERROR}Install Podman or Docker${NC}" - exit 1 -fi +source "$(dirname "$0")/../../scripts/image-utils.sh" +build_and_run 31337 "-e DATABASE_URL=memory:// -e ASSETS=1" diff --git a/web/scripts/run-image.sh b/web/scripts/run-image.sh index 1f19954c..fdb5b2e6 100755 --- a/web/scripts/run-image.sh +++ b/web/scripts/run-image.sh @@ -1,35 +1,5 @@ #!/bin/bash # Test real production environment with Podman or Docker -set -e - -ERROR='\033[0;31m' -WARNING='\033[0;33m' -OK='\033[1;32m' -NC='\033[0m' # No Color - -command_exists() { - command -v "$1" >/dev/null 2>&1 -} - -build_and_run() { - BUILD_OUTPUT=$($1 build . 2>&1) || { - echo -e "${ERROR}Build failed:${NC}\n$BUILD_OUTPUT" - exit 1 - } - IMAGE_ID=$(echo "$BUILD_OUTPUT" | tail -1) - SIZE=$($1 image inspect "$IMAGE_ID" --format='{{.Size}}' | \ - awk '{printf "%d MB", $1/1024/1024}') - echo -e "${WARNING}Image size: ${SIZE}${NC}" - echo -e "${OK}Web server is running on http://localhost:8080${NC}" - $1 run --rm -p 8080:8080 -e PORT=8080 -it $IMAGE_ID -} - -if command_exists podman; then - build_and_run podman -elif command_exists docker; then - build_and_run docker -else - echo -e "${ERROR}Install Podman or Docker${NC}" - exit 1 -fi +source "$(dirname "$0")/../../scripts/image-utils.sh" +build_and_run 8080 From 7bd975d7102b28422c6a4cd7094a99eba235beae Mon Sep 17 00:00:00 2001 From: Andrey Sitnik Date: Tue, 18 Mar 2025 21:31:41 +0100 Subject: [PATCH 6/8] Move to scratch base for Node.js images --- proxy/Dockerfile | 17 ++++++++++++++--- server/Dockerfile | 14 +++++++++++--- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/proxy/Dockerfile b/proxy/Dockerfile index 074c3f96..3fcbf7c3 100644 --- a/proxy/Dockerfile +++ b/proxy/Dockerfile @@ -1,15 +1,26 @@ -FROM alpine:3.21.3 +FROM docker.io/alpine:3.21.3 as base ENV NODE_VERSION 22.14.0 ENV NODE_CHECKSUM sha256:87f163387ac85df69df6eeb863a6b6a1aa789b49cda1c495871c0fe360634db3 +RUN apk add --no-cache libstdc++ ADD --checksum=$NODE_CHECKSUM https://unofficial-builds.nodejs.org/download/release/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64-musl.tar.xz /node.tar.xz RUN tar -xf "node.tar.xz" --strip-components=1 -C /usr/local/ \ "node-v${NODE_VERSION}-linux-x64-musl/bin/node" && rm "node.tar.xz" -RUN apk add --no-cache libstdc++ -ENV NODE_ENV production +RUN ls /lib +RUN ls /usr/lib + +FROM scratch WORKDIR /var/app +ENV NODE_ENV production + +COPY --from=base /bin/sh /bin/sh +COPY --from=base /lib/ld-musl-x86_64.so.1 /lib/ld-musl-x86_64.so.1 +COPY --from=base /usr/lib/libgcc_s.so.1 /usr/lib/libgcc_s.so.1 +COPY --from=base /usr/lib/libstdc++.so.6 /usr/lib/libstdc++.so.6 +COPY --from=base /usr/local/bin/node /usr/local/bin/node + COPY ./dist/ /var/app/ USER 1000:1000 diff --git a/server/Dockerfile b/server/Dockerfile index 3bd01f60..96cb8ef7 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,17 +1,25 @@ -FROM alpine:3.21.3 +FROM docker.io/alpine:3.21.3 as base ENV NODE_VERSION 22.14.0 ENV NODE_CHECKSUM sha256:87f163387ac85df69df6eeb863a6b6a1aa789b49cda1c495871c0fe360634db3 +RUN apk add --no-cache libstdc++ ADD --checksum=$NODE_CHECKSUM https://unofficial-builds.nodejs.org/download/release/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64-musl.tar.xz /node.tar.xz RUN tar -xf "node.tar.xz" --strip-components=1 -C /usr/local/ \ "node-v${NODE_VERSION}-linux-x64-musl/bin/node" && rm "node.tar.xz" -RUN apk add --no-cache libstdc++ +FROM scratch +WORKDIR /var/app ENV NODE_ENV production ENV LOGUX_HOST 0.0.0.0 ENV LOGUX_LOGGER json -WORKDIR /var/app + +COPY --from=base /bin/sh /bin/sh +COPY --from=base /lib/ld-musl-x86_64.so.1 /lib/ld-musl-x86_64.so.1 +COPY --from=base /usr/lib/libgcc_s.so.1 /usr/lib/libgcc_s.so.1 +COPY --from=base /usr/lib/libstdc++.so.6 /usr/lib/libstdc++.so.6 +COPY --from=base /usr/local/bin/node /usr/local/bin/node + COPY ./dist/ /var/app/ COPY ./web/ /var/web/ From 0e4169ea7c2ae42fa3226e95a6b44b4750d80b50 Mon Sep 17 00:00:00 2001 From: Andrey Sitnik Date: Tue, 18 Mar 2025 21:43:15 +0100 Subject: [PATCH 7/8] Remove debug code --- proxy/Dockerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/proxy/Dockerfile b/proxy/Dockerfile index 3fcbf7c3..cfcc4620 100644 --- a/proxy/Dockerfile +++ b/proxy/Dockerfile @@ -8,9 +8,6 @@ ADD --checksum=$NODE_CHECKSUM https://unofficial-builds.nodejs.org/download/rele RUN tar -xf "node.tar.xz" --strip-components=1 -C /usr/local/ \ "node-v${NODE_VERSION}-linux-x64-musl/bin/node" && rm "node.tar.xz" -RUN ls /lib -RUN ls /usr/lib - FROM scratch WORKDIR /var/app ENV NODE_ENV production From 8d0095564173db1ddcdd77c7fd3b1d82b009c211 Mon Sep 17 00:00:00 2001 From: Andrey Sitnik Date: Sat, 22 Mar 2025 22:11:19 +0100 Subject: [PATCH 8/8] Fix rebase --- .github/workflows/server.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml index 5e88529c..d5fab4ab 100644 --- a/.github/workflows/server.yml +++ b/.github/workflows/server.yml @@ -90,7 +90,7 @@ jobs: folder: ./server/ registry: staging/server service: staging-server - env: ASSETS=,PROXY_ORIGIN=,DATABASE_URL=file:///var/mnt/db/pgdata + env: ASSETS=,PROXY_ORIGIN=,DATABASE_URL=dump:/var/mnt/db/db.pglite # Persistent database was disable temporary to save money # flags: | # --vpc-connector db-connector