Skip to content

Commit

Permalink
cra pwa scaffolding web frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
bayareaunicorn committed May 12, 2024
1 parent cfe391d commit 76395fb
Show file tree
Hide file tree
Showing 22 changed files with 18,765 additions and 0 deletions.
23 changes: 23 additions & 0 deletions apps/web/frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
32 changes: 32 additions & 0 deletions apps/web/frontend/DOCKERFILE
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Boiler Code

# Use the official Node image with alpine flavor for a smaller image size
FROM node:alpine AS build

# Set the working directory in the container
WORKDIR /app

# Copy package.json and package-lock.json to the working directory
COPY package*.json ./

# Install dependencies
RUN npm install

# Copy the rest of the application files to the working directory
COPY . .

# Build the React application
RUN npm run build

# Use the official Nginx image as the final base image
FROM nginx:alpine

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

# Expose port 80
EXPOSE 80

# Start Nginx server
CMD ["nginx", "-g", "daemon off;"]

Loading

0 comments on commit 76395fb

Please sign in to comment.