Use bun for web3proxy and webui
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Use an official Node.js image as the base
|
||||
FROM node:18-alpine
|
||||
# Use an official Bun image as the base
|
||||
FROM oven/bun:1.3-debian
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /app
|
||||
@@ -8,26 +8,26 @@ WORKDIR /app
|
||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
||||
|
||||
# Install git and Python
|
||||
RUN apk update && apk add --no-cache git python3 make g++
|
||||
RUN apt-get update && apt-get install -y git python3 make g++ && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Create a symlink for python3 as python
|
||||
RUN ln -sf /usr/bin/python3 /usr/bin/python
|
||||
|
||||
# Copy package.json and package-lock.json to the container
|
||||
# Copy package.json and bun.lockb to the container
|
||||
# COPY package*.json ./
|
||||
COPY /src/Managing.WebApp/package.json ./
|
||||
|
||||
# Install dependencies with the --legacy-peer-deps flag to bypass peer dependency conflicts
|
||||
RUN npm install --legacy-peer-deps
|
||||
RUN npm install -g tailwindcss postcss autoprefixer @tailwindcss/typography
|
||||
# Install dependencies with bun
|
||||
RUN bun install
|
||||
RUN bun add -g tailwindcss postcss autoprefixer @tailwindcss/typography
|
||||
|
||||
# Copy the rest of the app's source code to the container
|
||||
# COPY . .
|
||||
COPY src/Managing.WebApp/ /app/
|
||||
RUN node --max-old-space-size=8192 ./node_modules/.bin/vite build
|
||||
RUN bun --bun ./node_modules/.bin/vite build
|
||||
|
||||
# Build the app
|
||||
RUN npm run build
|
||||
RUN bun run build
|
||||
|
||||
# Use NGINX as the web server
|
||||
FROM nginx:alpine
|
||||
|
||||
Reference in New Issue
Block a user