File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5757 # Build the Docker image
5858 - name : Build Image
5959 run : |-
60- docker build -f Dockerfile.prod --tag europe-west3-docker.pkg.dev/$PROJECT_ID/$REPOSITORY_NAME_DEV/$IMAGE:latest .
60+ docker build -f Dockerfile.dev --tag europe-west3-docker.pkg.dev/$PROJECT_ID/$REPOSITORY_NAME_DEV/$IMAGE:latest .
6161 # Push the Docker image to Google Artifact Registry
6262 - name : Publish Image to Google Artifact Registry
6363 run : |-
Original file line number Diff line number Diff line change 1+ # build environment
2+ FROM node:18-alpine3.14 as build
3+ WORKDIR /app
4+ ENV PATH /app/node_modules/.bin:$PATH
5+ COPY package.json ./
6+ COPY package-lock.json ./
7+ RUN export NODE_OPTIONS=--max-old-space-size=8192
8+ RUN npm ci --silent
9+ RUN npm install react-scripts@latest -g --silent
10+ COPY . ./
11+ RUN npm run build
12+
13+ # production environment
14+ FROM nginx:stable-alpine
15+ COPY --from=build /app/build /usr/share/nginx/html
16+ COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf
17+ EXPOSE 80
18+ CMD ["nginx", "-g", "daemon off;"]
You can’t perform that action at this time.
0 commit comments