File tree Expand file tree Collapse file tree 3 files changed +16
-17
lines changed Expand file tree Collapse file tree 3 files changed +16
-17
lines changed Original file line number Diff line number Diff line change 1- name : Polygon Webflow APIs
1+ name : Polygon Tokenlist api GCP docker publish image
22on :
33 push :
44 branches :
1515 if : |
1616 (github.event_name == 'push' && github.ref == 'refs/heads/dev') ||
1717 (github.event_name == 'push' && github.ref == 'refs/heads/master')
18- uses : ./ .github/workflows/docker_publish_gcp .yaml
18+ uses : 0xPolygon/pipelines/ .github/workflows/gcp_pipeline_release_image .yaml@main
1919 with :
20- core_app : api-polygon-tokens
21- environment : ${{ (github.ref == 'refs/heads/dev' && 'dev') || (github.ref == 'refs/heads/master' && 'prod') }}
20+ image_name : api-polygon-tokens
21+ environment : ${{ (github.ref == 'refs/heads/dev' && 'dev') || (github.ref == 'refs/heads/master' && 'prod') }}
Original file line number Diff line number Diff line change 2323 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2424 - uses : actions/checkout@v2
2525
26- # Runs a set of commands using the runners shell
27- - name : Install dependencies
28- run : npm ci
29-
30- - name : Build tokenlists
31- run : npm run build
32-
3326 - name : Configure AWS credentials
3427 uses : aws-actions/configure-aws-credentials@v2
3528 with :
Original file line number Diff line number Diff line change 1- # Serve the app with NGINX
1+ # Builder stage
2+ FROM node:18 AS builder
3+
4+ WORKDIR /app
5+ COPY package*.json ./
6+ RUN npm ci
7+
8+ COPY . .
9+ RUN npm run build
10+
11+ # Final stage (Nginx)
212FROM nginx:alpine
313
4- # Copy the build files from the dist folder to /usr/share/nginx/html
5- COPY build /usr/share/nginx/html
14+ COPY --from=builder /app/build /usr/share/nginx/html
615COPY nginx.conf /etc/nginx/conf.d/default.conf
7-
8- # Expose the desired port (default is 80 for NGINX)
916EXPOSE 3000
1017
11- # Start NGINX
1218CMD ["nginx" , "-g" , "daemon off;" ]
You can’t perform that action at this time.
0 commit comments