fix building hopefully
This commit is contained in:
+8
-5
@@ -31,19 +31,22 @@ ENV PATH="${GOPATH}/bin:${PATH}"
|
|||||||
# Install garble for obfuscated agent builds (requires Go 1.25+)
|
# Install garble for obfuscated agent builds (requires Go 1.25+)
|
||||||
RUN go install mvdan.cc/garble@latest
|
RUN go install mvdan.cc/garble@latest
|
||||||
|
|
||||||
# Copy package files
|
# Copy package files and lockfile
|
||||||
COPY Overlord-Server/package.json Overlord-Server/bun.lockb* ./
|
COPY Overlord-Server/package.json Overlord-Server/bun.lock* ./
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN bun install --frozen-lockfile
|
RUN bun install --frozen-lockfile
|
||||||
|
|
||||||
# Copy source code and client code (needed for builds)
|
# Copy source code and client code (needed for builds)
|
||||||
COPY Overlord-Server/ ./
|
COPY Overlord-Server/ ./
|
||||||
COPY Overlord-Client/ ../Overlord-Client/
|
COPY Overlord-Client/ ./Overlord-Client/
|
||||||
|
|
||||||
# Create necessary directories
|
# Create necessary directories
|
||||||
RUN mkdir -p certs public data
|
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 the default port
|
||||||
EXPOSE 5173
|
EXPOSE 5173
|
||||||
|
|
||||||
@@ -53,5 +56,5 @@ ENV HOST=0.0.0.0
|
|||||||
ENV DATA_DIR=/app/data
|
ENV DATA_DIR=/app/data
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
# Run the server
|
# Run the production build
|
||||||
CMD ["bun", "run", "src/index.ts"]
|
CMD ["bun", "run", "dist/index.js"]
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "bun --watch src/index.ts",
|
"dev": "bun --watch src/index.ts",
|
||||||
"start": "bun run src/index.ts",
|
"start": "bun run build:css && bun run src/index.ts",
|
||||||
"build": "bun build --production --minify src/index.ts --target bun --outdir dist",
|
"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: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: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",
|
"build:css": "tailwindcss -i ./src/styles.css -o ./public/assets/tailwind.css --minify",
|
||||||
|
|||||||
Reference in New Issue
Block a user