-
Notifications
You must be signed in to change notification settings - Fork 2
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
7781f1c
commit cd51a59
Showing
4 changed files
with
1,732 additions
and
1,580 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
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 |
---|---|---|
|
@@ -7,64 +7,78 @@ RUN apk add --no-cache \ | |
python3 \ | ||
make \ | ||
g++ \ | ||
build-base | ||
build-base \ | ||
git \ | ||
python3 \ | ||
py3-pip \ | ||
autoconf \ | ||
automake \ | ||
libtool \ | ||
nasm | ||
|
||
# Install pnpm globally with specific version | ||
RUN npm install -g [email protected] | ||
# Install global dependencies | ||
RUN npm install -g node-gyp node-gyp-build [email protected] | ||
|
||
WORKDIR /app | ||
|
||
# Copy package configs | ||
COPY package.json pnpm-lock.yaml .npmrc ./ | ||
# Set environment variables for native builds | ||
ENV PYTHON=/usr/bin/python3 | ||
ENV NODE_GYP=/usr/local/lib/node_modules/node-gyp/bin/node-gyp.js | ||
ENV PATH="/usr/local/lib/node_modules/node-gyp-build/bin:${PATH}" | ||
|
||
# First, try to install dependencies with frozen lockfile | ||
RUN pnpm install --frozen-lockfile --verbose || \ | ||
# If that fails, try without frozen lockfile | ||
(rm -rf node_modules && pnpm install --no-frozen-lockfile --verbose) | ||
# Copy package configs | ||
COPY package.json pnpm-lock.yaml ./ | ||
|
||
# Create .npmrc with necessary config | ||
RUN echo "node-linker=hoisted" > .npmrc && \ | ||
echo "shamefully-hoist=true" >> .npmrc && \ | ||
echo "strict-peer-dependencies=false" >> .npmrc && \ | ||
echo "node-gyp=/usr/local/lib/node_modules/node-gyp/bin/node-gyp.js" >> .npmrc && \ | ||
echo "python=/usr/bin/python3" >> .npmrc | ||
|
||
# Install dependencies | ||
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store \ | ||
pnpm install --no-frozen-lockfile \ | ||
--unsafe-perm \ | ||
--shamefully-hoist \ | ||
--network-timeout 300000 | ||
|
||
# Rebuild the source code only when needed | ||
FROM node:18-alpine AS builder | ||
WORKDIR /app | ||
|
||
# Install pnpm globally with specific version | ||
RUN npm install -g [email protected] | ||
|
||
# Copy all files from deps stage | ||
# Copy all files | ||
COPY --from=deps /app/node_modules ./node_modules | ||
COPY . . | ||
|
||
# Optional: Disable Next.js telemetry during the build | ||
ENV NEXT_TELEMETRY_DISABLED 1 | ||
|
||
# Build the Next.js application | ||
# Build the application | ||
RUN pnpm run build | ||
|
||
# Production image, copy all the files and run Next.js | ||
# Production image | ||
FROM node:18-alpine AS runner | ||
WORKDIR /app | ||
|
||
# Install pnpm globally with specific version | ||
RUN npm install -g [email protected] | ||
|
||
ENV NODE_ENV production | ||
ENV NEXT_TELEMETRY_DISABLED 1 | ||
|
||
RUN addgroup --system --gid 1001 nodejs | ||
RUN adduser --system --uid 1001 nextjs | ||
RUN addgroup --system --gid 1001 nodejs && \ | ||
adduser --system --uid 1001 nextjs | ||
|
||
# Copy necessary files | ||
COPY --from=builder /app/public ./public | ||
COPY --from=builder /app/package.json ./package.json | ||
COPY --from=builder /app/.next/standalone ./ | ||
COPY --from=builder /app/.next/static ./.next/static | ||
|
||
# Ensure proper permissions | ||
RUN chmod -R 777 ./public | ||
|
||
USER nextjs | ||
|
||
EXPOSE 3000 | ||
ENV PORT 3000 | ||
|
||
# Start the application | ||
CMD ["node", "server.js"] |
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,76 +1,79 @@ | ||
{ | ||
"name": "studio", | ||
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start", | ||
"lint": "next lint" | ||
}, | ||
"dependencies": { | ||
"@google/model-viewer": "^4.0.0", | ||
"@hookform/resolvers": "^3.6.0", | ||
"@metaplex-foundation/js": "^0.20.1", | ||
"@radix-ui/react-checkbox": "^1.0.4", | ||
"@radix-ui/react-dialog": "^1.0.5", | ||
"@radix-ui/react-label": "^2.0.2", | ||
"@radix-ui/react-navigation-menu": "^1.1.4", | ||
"@radix-ui/react-radio-group": "^1.1.3", | ||
"@radix-ui/react-select": "^2.1.2", | ||
"@radix-ui/react-slot": "^1.0.2", | ||
"@react-three/drei": "^9.120.3", | ||
"@react-three/fiber": "^8.17.10", | ||
"@react-three/postprocessing": "^2.15.1", | ||
"@readyplayerme/react-avatar-creator": "^0.5.0", | ||
"@readyplayerme/visage": "^5.1.0", | ||
"@solana/wallet-adapter-base": "^0.9.23", | ||
"@solana/wallet-adapter-react": "^0.15.35", | ||
"@solana/wallet-adapter-react-ui": "^0.9.35", | ||
"@solana/wallet-adapter-wallets": "^0.19.32", | ||
"@solana/web3.js": "^1.98.0", | ||
"@tanstack/react-query": "^5.51.23", | ||
"@uploadthing/react": "^6.6.0", | ||
"@web3modal/wagmi": "^5.0.11", | ||
"axios": "^1.7.9", | ||
"canvas-confetti": "^1.9.3", | ||
"class-variance-authority": "^0.7.0", | ||
"clsx": "^2.1.1", | ||
"form-data": "^4.0.1", | ||
"formidable": "^3.5.2", | ||
"install": "^0.13.0", | ||
"lucide-react": "^0.394.0", | ||
"next": "14.2.4", | ||
"nft.storage": "^7.1.1", | ||
"permissionless": "^0.1.31", | ||
"postprocessing": "^6.36.5", | ||
"react": "^18", | ||
"react-dom": "^18", | ||
"react-form-repeater": "^0.3.0", | ||
"react-hook-form": "^7.52.0", | ||
"react-toastify": "^10.0.5", | ||
"tailwind-merge": "^2.3.0", | ||
"tailwindcss-animate": "^1.0.7", | ||
"three": "^0.171.0", | ||
"three-mesh-bvh": "^0.5.24", | ||
"uploadthing": "^6.12.0", | ||
"uuid": "^10.0.0", | ||
"viem": "^2.19.4", | ||
"wagmi": "^2.12.5", | ||
"zod": "^3.23.8" | ||
}, | ||
"devDependencies": { | ||
"@types/canvas-confetti": "^1.6.4", | ||
"@types/formidable": "^3.4.5", | ||
"@types/node": "^20", | ||
"@types/react": "^18", | ||
"@types/react-dom": "^18", | ||
"@types/three": "^0.152.1", | ||
"@types/uuid": "^10.0.0", | ||
"eslint": "^8", | ||
"eslint-config-next": "14.2.4", | ||
"postcss": "^8", | ||
"tailwindcss": "^3.4.1", | ||
"typescript": "^5" | ||
} | ||
"name": "studio", | ||
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start", | ||
"lint": "next lint" | ||
}, | ||
"dependencies": { | ||
"@google/model-viewer": "^4.0.0", | ||
"@hookform/resolvers": "^3.6.0", | ||
"@metaplex-foundation/js": "^0.20.1", | ||
"@radix-ui/react-checkbox": "^1.0.4", | ||
"@radix-ui/react-dialog": "^1.0.5", | ||
"@radix-ui/react-label": "^2.0.2", | ||
"@radix-ui/react-navigation-menu": "^1.1.4", | ||
"@radix-ui/react-radio-group": "^1.1.3", | ||
"@radix-ui/react-select": "^2.1.2", | ||
"@radix-ui/react-slot": "^1.0.2", | ||
"@react-three/drei": "^9.120.3", | ||
"@react-three/fiber": "^8.17.10", | ||
"@react-three/postprocessing": "^2.15.1", | ||
"@readyplayerme/react-avatar-creator": "^0.5.0", | ||
"@readyplayerme/visage": "^5.1.0", | ||
"@solana/wallet-adapter-base": "^0.9.23", | ||
"@solana/wallet-adapter-react": "^0.15.35", | ||
"@solana/wallet-adapter-react-ui": "^0.9.35", | ||
"@solana/wallet-adapter-wallets": "^0.19.32", | ||
"@solana/web3.js": "^1.98.0", | ||
"@tanstack/react-query": "^5.51.23", | ||
"@uploadthing/react": "^6.6.0", | ||
"@web3modal/wagmi": "^5.0.11", | ||
"axios": "^1.7.9", | ||
"canvas-confetti": "^1.9.3", | ||
"class-variance-authority": "^0.7.0", | ||
"clsx": "^2.1.1", | ||
"form-data": "^4.0.1", | ||
"formidable": "^3.5.2", | ||
"install": "^0.13.0", | ||
"lucide-react": "^0.394.0", | ||
"next": "14.2.4", | ||
"nft.storage": "^7.1.1", | ||
"permissionless": "^0.1.31", | ||
"postprocessing": "^6.36.5", | ||
"react": "^18", | ||
"react-dom": "^18", | ||
"react-form-repeater": "^0.3.0", | ||
"react-hook-form": "^7.52.0", | ||
"react-toastify": "^10.0.5", | ||
"tailwind-merge": "^2.3.0", | ||
"tailwindcss-animate": "^1.0.7", | ||
"three": "^0.171.0", | ||
"three-mesh-bvh": "^0.5.24", | ||
"uploadthing": "^6.12.0", | ||
"uuid": "^10.0.0", | ||
"viem": "^2.19.4", | ||
"wagmi": "^2.12.5", | ||
"zod": "^3.23.8" | ||
}, | ||
"devDependencies": { | ||
"@types/canvas-confetti": "^1.6.4", | ||
"@types/formidable": "^3.4.5", | ||
"@types/node": "^20", | ||
"@types/react": "^18", | ||
"@types/react-dom": "^18", | ||
"@types/three": "^0.152.1", | ||
"@types/uuid": "^10.0.0", | ||
"eslint": "^8", | ||
"eslint-config-next": "14.2.4", | ||
"postcss": "^8", | ||
"tailwindcss": "^3.4.1", | ||
"typescript": "^5", | ||
"node-gyp": "^9.0.0", | ||
"@node-rs/helper": "^1.2.1", | ||
"node-gyp-build": "^4.8.4" | ||
} | ||
} |
Oops, something went wrong.