changed docker
This commit is contained in:
parent
2408da87e3
commit
13504502ed
|
|
@ -0,0 +1,7 @@
|
||||||
|
node_modules
|
||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
README.md
|
||||||
|
.env
|
||||||
|
.DS_Store
|
||||||
|
*.log
|
||||||
12
Dockerfile
12
Dockerfile
|
|
@ -6,19 +6,15 @@ WORKDIR /app
|
||||||
COPY package.json package-lock.json ./
|
COPY package.json package-lock.json ./
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
# Fix Windows line endings and permissions for Vite binary
|
|
||||||
RUN apt-get update && apt-get install -y dos2unix
|
|
||||||
RUN dos2unix node_modules/.bin/vite
|
|
||||||
RUN chmod +x node_modules/.bin/vite
|
|
||||||
|
|
||||||
# Copy the rest of the source code
|
# Copy the rest of the source code
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Set environment variable for Vite (customize as needed)
|
# Set environment variable for Vite
|
||||||
ENV VITE_API_BASE_URL=https://navigolabs.com/api
|
ENV VITE_API_BASE_URL=https://navigolabs.com/api
|
||||||
|
|
||||||
# Build the Vite app
|
# Fix permissions for all node_modules binaries and build
|
||||||
RUN npm run build
|
RUN chmod -R +x node_modules/.bin/ && \
|
||||||
|
npm run build
|
||||||
|
|
||||||
# Stage 2: Serve with Node
|
# Stage 2: Serve with Node
|
||||||
FROM node:20-bullseye
|
FROM node:20-bullseye
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue