fix: Add build:prod scripts to skip type generation during Docker builds
- Client and admin builds fail in Docker due to missing ../server directory - build:prod scripts bypass generate-types step for containerized builds - Local development still uses full build with type generation
This commit is contained in:
@@ -16,8 +16,8 @@ RUN npm install
|
|||||||
# Copy source code
|
# Copy source code
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Build Vue application
|
# Build Vue application (skip type generation in Docker)
|
||||||
RUN npm run build
|
RUN npm run build:prod
|
||||||
|
|
||||||
# Expose port
|
# Expose port
|
||||||
EXPOSE 3001
|
EXPOSE 3001
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "npm run generate-types && vite",
|
"dev": "npm run generate-types && vite",
|
||||||
"build": "npm run generate-types && vue-tsc && vite build",
|
"build": "npm run generate-types && vue-tsc && vite build",
|
||||||
|
"build:prod": "vue-tsc && vite build",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"serve": "PORT=3002 nodemon server.js",
|
"serve": "PORT=3002 nodemon server.js",
|
||||||
"start": "NODE_ENV=production node server.js",
|
"start": "NODE_ENV=production node server.js",
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ RUN npm install
|
|||||||
# Copy source code
|
# Copy source code
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Build Vue application
|
# Build Vue application (skip type generation in Docker)
|
||||||
RUN npm run build
|
RUN npm run build:prod
|
||||||
|
|
||||||
# Expose port
|
# Expose port
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "npm run generate-types && vite",
|
"dev": "npm run generate-types && vite",
|
||||||
"build": "npm run generate-types && vue-tsc && vite build",
|
"build": "npm run generate-types && vue-tsc && vite build",
|
||||||
|
"build:prod": "vue-tsc && vite build",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"serve": "nodemon server.js",
|
"serve": "nodemon server.js",
|
||||||
"start": "NODE_ENV=production node server.js",
|
"start": "NODE_ENV=production node server.js",
|
||||||
|
|||||||
Reference in New Issue
Block a user