Skip to content

Commit 7093c17

Browse files
authored
update discord.js and build scripts. (#43)
1 parent 3c9c5d9 commit 7093c17

8 files changed

Lines changed: 580 additions & 311 deletions

File tree

.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ node_modules
33
*.sqlite
44
*.tar
55
.git
6-
dist
6+
dist
7+
.buildx-cache

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
/imgs/qp/*.jpg
55
--Frag*
66
*.sqlite
7-
*.tar
7+
*.tar
8+
.buildx-cache

Dockerfile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
FROM node:20-bullseye
1+
# Stage 1: Build
2+
FROM --platform=linux/arm/v7 node:18.20.8-bullseye AS builder
3+
WORKDIR /usr/src/app
24

5+
# Copy only package files to cache dependencies
6+
COPY package*.json ./
37

4-
WORKDIR /usr/src/app
8+
# Install deps (cached if package.json doesn't change)
9+
RUN npm ci --prefer-offline --no-audit
510

11+
# Copy source files
612
COPY . .
713

8-
RUN npm install
9-
14+
# Build TS
15+
RUN npm run build

build-image.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
#!/bin/bash
22
set -e
33

4-
docker buildx build --platform linux/arm/v7 -t toolsy:latest .
4+
docker buildx build \
5+
--platform linux/arm/v7 \
6+
--build-arg BUILDKIT_INLINE_CACHE=1 \
7+
--cache-from=type=local,src=.buildx-cache \
8+
--cache-to=type=local,dest=.buildx-cache-new \
9+
-t toolsy:latest .
10+
11+
mv .buildx-cache-new .buildx-cache
512

613
docker save -o toolsy.tar toolsy:latest

0 commit comments

Comments
 (0)