added turborepo and working on Docker setup
This commit is contained in:
+2
-1
@@ -1,2 +1,3 @@
|
||||
node_modules
|
||||
.turbo
|
||||
.turbo
|
||||
out
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
# 1. Build stage
|
||||
FROM node:22-slim AS builder
|
||||
|
||||
ENV NVM_DIR=/root/.nvm
|
||||
ENV NODE_VERSION=22
|
||||
|
||||
# Install dependencies for Node
|
||||
RUN apt-get update && apt-get dist-upgrade -y && apt-get install -y ca-certificates build-essential
|
||||
|
||||
# Enable corepack and prepare pnpm
|
||||
RUN corepack enable && corepack prepare pnpm@latest --activate
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN rm -rf node_modules pnpm-lock.yaml
|
||||
RUN yes | pnpm install
|
||||
|
||||
RUN pnpm turbo run build --filter=lightsaver_user_client...
|
||||
|
||||
#debugging
|
||||
RUN ls -al /app/apps/lightsaver_user_client
|
||||
|
||||
# 2. Production stage
|
||||
FROM node:22-slim
|
||||
|
||||
# Enable corepack and prepare pnpm
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app/apps/lightsaver_user_client ./
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
COPY --from=builder /app/packages ./packages
|
||||
|
||||
EXPOSE 3000
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "web",
|
||||
"name": "lightsaver_user_client",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "turbo build",
|
||||
"build": "turbo run build",
|
||||
"check-types": "tsc --noEmit",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
|
||||
+8
-3
@@ -1,4 +1,9 @@
|
||||
packages:
|
||||
- "apps/*"
|
||||
- "services/*"
|
||||
- "packages/*"
|
||||
- apps/*
|
||||
- services/*
|
||||
- packages/*
|
||||
|
||||
onlyBuiltDependencies:
|
||||
- '@tailwindcss/oxide'
|
||||
- sharp
|
||||
- unrs-resolver
|
||||
|
||||
Reference in New Issue
Block a user