From 049c99552c2831ed1087fc4362b05c81428a9ec6 Mon Sep 17 00:00:00 2001 From: KingKDot Date: Thu, 5 Mar 2026 12:50:16 -0600 Subject: [PATCH] fix building hopefully --- Dockerfile | 13 ++++++++----- Overlord-Server/package.json | 4 ++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3db313c..6662a1a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,19 +31,22 @@ ENV PATH="${GOPATH}/bin:${PATH}" # Install garble for obfuscated agent builds (requires Go 1.25+) RUN go install mvdan.cc/garble@latest -# Copy package files -COPY Overlord-Server/package.json Overlord-Server/bun.lockb* ./ +# Copy package files and lockfile +COPY Overlord-Server/package.json Overlord-Server/bun.lock* ./ # Install dependencies RUN bun install --frozen-lockfile # Copy source code and client code (needed for builds) COPY Overlord-Server/ ./ -COPY Overlord-Client/ ../Overlord-Client/ +COPY Overlord-Client/ ./Overlord-Client/ # Create necessary directories RUN mkdir -p certs public data +# Build production server bundle and ensure Tailwind CSS is present +RUN bun run build && test -s ./public/assets/tailwind.css + # Expose the default port EXPOSE 5173 @@ -53,5 +56,5 @@ ENV HOST=0.0.0.0 ENV DATA_DIR=/app/data ENV NODE_ENV=production -# Run the server -CMD ["bun", "run", "src/index.ts"] +# Run the production build +CMD ["bun", "run", "dist/index.js"] diff --git a/Overlord-Server/package.json b/Overlord-Server/package.json index 3085fca..9cc1c46 100644 --- a/Overlord-Server/package.json +++ b/Overlord-Server/package.json @@ -5,8 +5,8 @@ "type": "module", "scripts": { "dev": "bun --watch src/index.ts", - "start": "bun run src/index.ts", - "build": "bun build --production --minify src/index.ts --target bun --outdir dist", + "start": "bun run build:css && bun run src/index.ts", + "build": "bun run build:css && bun build --production --minify src/index.ts --target bun --outdir dist", "build:prod:win": "bun build --production --minify src/index.ts --compile --target bun-windows-x64 --outfile dist/overlord-server.exe", "build:prod:linux": "bun build --production --minify src/index.ts --compile --target bun-linux-x64 --outfile dist/overlord-server-linux-x64", "build:css": "tailwindcss -i ./src/styles.css -o ./public/assets/tailwind.css --minify",