mirror of
https://github.com/GoodStartLabs/AI_Diplomacy.git
synced 2026-04-23 16:59:10 +00:00
Moved the assets to public, as assets is the directory that vite preview serves it's files from and that confuses vite. Using public is just easier. Updated all the needed links.
24 lines
464 B
Docker
24 lines
464 B
Docker
# vite-server/Dockerfile
|
|
FROM node:20.4.0-alpine
|
|
|
|
# Create app directory
|
|
WORKDIR /app
|
|
|
|
# Copy package.json and lock file first for better caching
|
|
COPY package.json package-lock.json ./
|
|
|
|
# Install dependencies
|
|
RUN npm install
|
|
|
|
# Now copy everything else
|
|
COPY . .
|
|
|
|
# Build the production-ready files (dist/)
|
|
RUN npm run build
|
|
|
|
# Expose the port that `npm run preview` uses (default is 4173)
|
|
EXPOSE 4173
|
|
|
|
# Finally, serve the built app
|
|
CMD ["npm", "run", "preview"]
|
|
|