SoundVerse / Dockerfile
mistpe's picture
Update Dockerfile
80f2d3a verified
raw
history blame contribute delete
622 Bytes
# Use Node.js 20 as base image
FROM node:20-alpine
# Install git
RUN apk add --no-cache git
# Set working directory
WORKDIR /app
# Clone the repository
RUN git clone https://github.com/zhanghxiao/SoundVerse.git .
# Install dependencies
RUN npm install
# Modify the build command to bypass TypeScript checks
RUN sed -i 's/"build": "tsc -b && vite build"/"build": "vite build"/g' package.json
# Build the application
RUN npm run build
# Install serve globally
RUN npm install -g serve
# Set environment variables
ENV PORT=7860
# Expose port
EXPOSE 7860
# Start the service
CMD ["serve", "-s", "dist", "-l", "7860"]