Revert "initial bun setup"

This reverts commit 5236f7a212.

bun was causing code 1006 websocket errors
This commit is contained in:
Evan
2025-03-16 20:37:04 -07:00
parent 46889077f0
commit 2c075fc382
6 changed files with 18474 additions and 3115 deletions
+6 -6
View File
@@ -8,14 +8,14 @@ jobs:
uses: actions/checkout@v4
with:
submodules: false
- name: Setup bun
uses: oven-sh/setup-bun@v2
- name: Setup node
uses: actions/setup-node@v4
with:
bun-version: 1.2.4
- name: install packages
run: bun install
node-version: 20
- name: Setup npm
run: npm install
- name: Build
run: bun run build-prod
run: npm run build-prod
- uses: actions/upload-artifact@v4
with:
path: out/index.html
+5 -4
View File
@@ -10,8 +10,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- uses: actions/setup-node@v4
with:
bun-version: 1.2.4
- run: bun i
- run: bunx prettier --check .
node-version: "20"
cache: "npm"
- run: npm ci
- run: npx prettier --check .
+10 -16
View File
@@ -1,5 +1,5 @@
# Build stage - will use your native architecture
FROM --platform=$BUILDPLATFORM oven/bun:1 AS builder
# Use an official Node runtime as the base image
FROM node:18
ARG GIT_COMMIT=unknown
ENV GIT_COMMIT=$GIT_COMMIT
@@ -7,29 +7,23 @@ ENV GIT_COMMIT=$GIT_COMMIT
# Set the working directory for the build
WORKDIR /build
# Copy package files
COPY package.json bun.lock ./
# Set the working directory in the container
WORKDIR /usr/src/app
# Copy package.json and package-lock.json
COPY package*.json ./
# Install dependencies while bypassing Husky hooks
ENV HUSKY=0
ENV NPM_CONFIG_IGNORE_SCRIPTS=1
RUN mkdir -p .git && bun install --include=dev
RUN mkdir -p .git && npm install --include=dev
# Copy the rest of the application code
COPY . .
# Build the client-side application with verbose output
RUN echo "Starting build process..." && bun run build-prod && echo "Build completed successfully!"
# Build the client-side application
RUN npm run build-prod
# Check output directory
RUN ls -la static || echo "Static directory not found"
# Production stage
FROM oven/bun:1
# Add environment variable
ARG GAME_ENV=prod
ENV GAME_ENV=$GAME_ENV
ENV NODE_ENV=production
ARG GIT_COMMIT=unknown
ENV GIT_COMMIT=$GIT_COMMIT
-3083
View File
File diff suppressed because it is too large Load Diff
+18447
View File
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -1,14 +1,14 @@
{
"name": "openfront-client",
"scripts": {
"build-map": "bun src/scripts/TerrainMapGenerator.ts",
"build-map": "node --loader ts-node/esm --experimental-specifier-resolution=node src/scripts/TerrainMapGenerator.ts",
"build-dev": "webpack --config webpack.config.js --mode development",
"build-prod": "webpack --config webpack.config.js --mode production",
"start:client": "webpack serve --open --node-env development",
"start:server": "bun src/server/Server.ts",
"start:server-dev": "cross-env GAME_ENV=dev bun src/server/Server.ts",
"dev": "cross-env GAME_ENV=dev concurrently \"bun run start:client\" \"bun run start:server-dev\"",
"tunnel": "bun run build-prod && bun run start:server",
"start:server": "node --loader ts-node/esm --experimental-specifier-resolution=node src/server/Server.ts",
"start:server-dev": "cross-env GAME_ENV=dev node --loader ts-node/esm --experimental-specifier-resolution=node src/server/Server.ts",
"dev": "cross-env GAME_ENV=dev concurrently \"npm run start:client\" \"npm run start:server-dev\"",
"tunnel": "npm run build-prod && npm run start:server",
"test": "jest",
"format": "prettier --ignore-unknown --write .",
"lint": "eslint",
@@ -30,7 +30,7 @@
"@types/jest": "^29.5.12",
"@types/jquery": "^3.5.31",
"@types/mocha": "^10.0.7",
"@types/bun": "latest",
"@types/node": "^22.10.2",
"@types/pg": "^8.11.11",
"@types/sinon": "^17.0.3",
"@types/systeminformation": "^3.23.1",