Pauls update

This commit is contained in:
benthecarman
2023-09-26 19:30:04 -05:00
committed by benthecarman
parent 6d799f3ce6
commit eefa8db990

View File

@@ -1,13 +1,15 @@
# Use Node.js as a base image for building the site # Use Node.js as a base image for building the site
FROM node:19-slim AS builder FROM node:20-slim AS builder
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN apt update && apt install -y git # This is the cooler way to run pnpm these days (no need to npm install it)
RUN corepack enable
# Set working directory COPY . /app
WORKDIR /app WORKDIR /app
# Install pnpm globally # I think we need git be here because the vite build wants to look up the commit hash
RUN npm install -g pnpm RUN apt update && apt install -y git
# Add the ARG directives for build-time environment variables # Add the ARG directives for build-time environment variables
ARG VITE_NETWORK="bitcoin" ARG VITE_NETWORK="bitcoin"
@@ -19,14 +21,11 @@ ARG VITE_AUTH="https://auth.mutinywallet.com"
ARG VITE_STORAGE="https://storage.mutinywallet.com" ARG VITE_STORAGE="https://storage.mutinywallet.com"
ARG VITE_SELFHOSTED="true" ARG VITE_SELFHOSTED="true"
# Copy package.json and pnpm-lock.yaml (or shrinkwrap.yaml) to utilize Docker cache
COPY package.json pnpm-lock.yaml ./
# Install dependencies # Install dependencies
RUN pnpm install RUN pnpm install --frozen-lockfile
# Copy the rest of the files # IDK why but it gets mad if you don't do this
COPY . . RUN git config --global --add safe.directory /app
# Build the static site # Build the static site
RUN pnpm run build RUN pnpm run build