create-bluecopa-react-app 1.0.9 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-bluecopa-react-app",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "CLI tool to create bluecopa React applications",
5
5
  "type": "module",
6
6
  "main": "./bin/create-bluecopa-react-app.js",
@@ -0,0 +1 @@
1
+ node_modules/
@@ -1,22 +1,29 @@
1
- FROM node:20-alpine AS development-dependencies-env
2
- COPY . /app
3
- WORKDIR /app
4
- RUN npm ci
5
-
6
- FROM node:20-alpine AS production-dependencies-env
7
- COPY ./package.json package-lock.json /app/
8
- WORKDIR /app
9
- RUN npm ci --omit=dev
10
-
11
- FROM node:20-alpine AS build-env
12
- COPY . /app/
13
- COPY --from=development-dependencies-env /app/node_modules /app/node_modules
14
- WORKDIR /app
1
+ FROM node:18-alpine AS production
2
+
3
+ # Set working directory
4
+ WORKDIR /usr/src/app
5
+
6
+ # Copy package files
7
+ COPY package*.json ./
8
+
9
+ # Install dependencies
10
+ RUN npm install
11
+
12
+ # Copy source code
13
+ COPY . .
14
+
15
+ # Build the application
15
16
  RUN npm run build
16
17
 
17
- FROM node:20-alpine
18
- COPY ./package.json package-lock.json /app/
19
- COPY --from=production-dependencies-env /app/node_modules /app/node_modules
20
- COPY --from=build-env /app/build /app/build
21
- WORKDIR /app
22
- CMD ["npm", "run", "start"]
18
+ # Install serve globally
19
+ RUN npm install -g serve@14.2.0
20
+
21
+ # Expose port
22
+ EXPOSE 8080
23
+
24
+ # Health check
25
+ HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
26
+ CMD wget --no-verbose --tries=1 --spider http://localhost:8080/health || exit 1
27
+
28
+ # Start the application
29
+ CMD ["npx", "serve", "-s", "dist", "-l", "8080", "--cors"]