-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b2b5e3b
commit 3c340a3
Showing
10 changed files
with
1,081 additions
and
5,135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.2.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,21 +20,17 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: ▫️ Setup pnpm | ||
uses: pnpm/[email protected] | ||
|
||
- name: ⎔ Setup node | ||
uses: actions/[email protected] | ||
- name: 🥟 Setup Bun | ||
uses: oven-sh/[email protected] | ||
with: | ||
node-version-file: .nvmrc | ||
cache: "pnpm" | ||
bun-version-file: ".bun-version" | ||
|
||
- name: 📥 Install dependencies | ||
shell: bash | ||
run: pnpm install --frozen-lockfile | ||
run: bun install --frozen-lockfile | ||
|
||
- name: 🔬 Lint | ||
run: pnpm run lint | ||
run: bun run lint | ||
|
||
format: | ||
name: 🎨 Prettier | ||
|
@@ -45,18 +41,14 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: ▫️ Setup pnpm | ||
uses: pnpm/[email protected] | ||
|
||
- name: ⎔ Setup node | ||
uses: actions/[email protected] | ||
- name: 🥟 Setup Bun | ||
uses: oven-sh/[email protected] | ||
with: | ||
node-version-file: .nvmrc | ||
cache: "pnpm" | ||
bun-version-file: ".bun-version" | ||
|
||
- name: 📥 Install dependencies | ||
shell: bash | ||
run: pnpm install --frozen-lockfile | ||
run: bun install --frozen-lockfile | ||
|
||
- name: 🎨 Format | ||
run: pnpm run format | ||
run: bun run format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/usr/bin/env sh | ||
|
||
pnpm lint-staged | ||
bun lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
pnpm-lock.yaml | ||
bun.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,39 @@ | ||
# syntax = docker/dockerfile:1 | ||
|
||
# Adjust NODE_VERSION as desired | ||
ARG NODE_VERSION=22.13.1 | ||
FROM node:${NODE_VERSION}-slim AS base | ||
# Adjust BUN_VERSION as desired | ||
ARG BUN_VERSION=1.2.2 | ||
FROM oven/bun:${BUN_VERSION} AS base | ||
|
||
LABEL fly_launch_runtime="Vite" | ||
|
||
# Vite app lives here | ||
WORKDIR /app | ||
WORKDIR /usr/src/app | ||
|
||
# Set production environment | ||
ENV NODE_ENV="production" | ||
|
||
# Set pnpm environment | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
FROM base AS install | ||
|
||
# Enable corepack | ||
RUN npm uninstall -g yarn pnpm && \ | ||
npm install -g corepack | ||
RUN mkdir -p /temp/dev | ||
COPY package.json bun.lock /temp/dev/ | ||
RUN cd /temp/dev && \ | ||
bun install --frozen-lockfile | ||
|
||
RUN mkdir -p /temp/prod | ||
COPY package.json bun.lock /temp/prod/ | ||
RUN cd /temp/prod && \ | ||
bun install --frozen-lockfile --production | ||
|
||
# Throw-away build stage to reduce size of final image | ||
FROM base AS build | ||
FROM base AS prerelease | ||
|
||
# Install packages needed to build node modules | ||
RUN apt-get update -qq && \ | ||
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 | ||
COPY --from=install /temp/dev/node_modules node_modules | ||
|
||
# Install node modules | ||
COPY package.json pnpm-lock.yaml ./ | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --prod=false | ||
|
||
# Copy application code | ||
COPY . . | ||
|
||
# Build application | ||
RUN pnpm run build | ||
ENV NODE_ENV="production" | ||
|
||
# Remove development dependencies | ||
RUN pnpm prune --prod | ||
RUN bun run build | ||
|
||
|
||
# Final stage for app image | ||
FROM nginx | ||
FROM nginx AS release | ||
|
||
# Copy built application | ||
COPY --from=build /app/dist /usr/share/nginx/html | ||
COPY --from=prerelease /usr/src/app/dist /usr/share/nginx/html | ||
|
||
# Start the server by default, this can be overwritten at runtime | ||
EXPOSE 80 | ||
CMD [ "/usr/sbin/nginx", "-g", "daemon off;" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,9 +60,5 @@ | |
"vite": "^6.0.11", | ||
"vite-tsconfig-paths": "^5.1.4", | ||
"typescript-eslint": "^8.23.0" | ||
}, | ||
"engines": { | ||
"node": ">=22.13.1" | ||
}, | ||
"packageManager": "[email protected]" | ||
} | ||
} |
Oops, something went wrong.