Add Dockerfile and docker-compose for production deployment
Multi-stage build: Node 20 builds the React app, nginx serves the static files on port 3000. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DReRqHxSYuVfCzTzQGD9hZ
This commit is contained in:
2 files changed
+16
No files matched your search
+11
@@ -0,0 +1,11 @@
|
||||
FROM node:20-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:alpine
|
||||
COPY --from=build /app/build /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
@@ -0,0 +1,5 @@
|
||||
services:
|
||||
prayer:
|
||||
build: .
|
||||
ports:
|
||||
- "3000:80"
|
||||
Reference in new issue
Block a user