Skip to content

Commit 9b824dc

Browse files
authored
Merge pull request #702 from maticnetwork/SPEC-889-github-workflow-for-docker-publish
GCP docker publish images to artifact repository
2 parents 641a633 + 160fae0 commit 9b824dc

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

.github/workflows/deploy_gcp.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Polygon Webflow APIs
1+
name: Polygon Tokenlist api GCP docker publish image
22
on:
33
push:
44
branches:
@@ -15,7 +15,7 @@ jobs:
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') }}

.github/workflows/ecs_prod.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@ jobs:
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:

Dockerfile

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
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)
212
FROM 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
615
COPY nginx.conf /etc/nginx/conf.d/default.conf
7-
8-
# Expose the desired port (default is 80 for NGINX)
916
EXPOSE 3000
1017

11-
# Start NGINX
1218
CMD ["nginx", "-g", "daemon off;"]

0 commit comments

Comments
 (0)