Skip to content

Commit

Permalink
chores: deploy to docker
Browse files Browse the repository at this point in the history
  • Loading branch information
ido-pluto committed Nov 3, 2023
1 parent d4939bc commit 9706f70
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM node:20 as build

WORKDIR /app

COPY . .

# Build the React app for production
RUN npm ci
RUN npm run build

# Use Nginx as the production server
FROM nginx:alpine

# Copy the built React app to Nginx's web server directory
COPY --from=build /app/dist /usr/share/nginx/html

EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]
4 changes: 4 additions & 0 deletions captain-definition
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"schemaVersion": 2,
"dockerfilePath": "./Dockerfile"
}

0 comments on commit 9706f70

Please sign in to comment.