Add: frontend dockerfile
This commit is contained in:
parent
2efb85edf3
commit
40ed8f6381
2 changed files with 29 additions and 0 deletions
9
frontend/.dockerignore
Normal file
9
frontend/.dockerignore
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# Text/doc files
|
||||||
|
*.md
|
||||||
|
|
||||||
|
# Git
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
|
||||||
|
# Node modules
|
||||||
|
node_modules/
|
20
frontend/Dockerfile
Normal file
20
frontend/Dockerfile
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# ./frontend/Dockerfile
|
||||||
|
|
||||||
|
# Use an official Node runtime as a parent image
|
||||||
|
FROM node:20-alpine
|
||||||
|
|
||||||
|
# Set work directory
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy package.json and package-lock.json (or yarn.lock)
|
||||||
|
COPY package*.json ./
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
# Copy the rest of the frontend source code
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# The command to run the dev server will be specified in docker-compose.dev.yml
|
||||||
|
# Expose the Vite default port (though mapping is done in compose)
|
||||||
|
EXPOSE 5173
|
Loading…
Add table
Reference in a new issue