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
2
2
on :
3
3
push :
4
4
branches :
15
15
if : |
16
16
(github.event_name == 'push' && github.ref == 'refs/heads/dev') ||
17
17
(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
19
19
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 23
23
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
24
24
- uses : actions/checkout@v2
25
25
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
-
33
26
- name : Configure AWS credentials
34
27
uses : aws-actions/configure-aws-credentials@v2
35
28
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)
2
12
FROM nginx:alpine
3
13
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
6
15
COPY nginx.conf /etc/nginx/conf.d/default.conf
7
-
8
- # Expose the desired port (default is 80 for NGINX)
9
16
EXPOSE 3000
10
17
11
- # Start NGINX
12
18
CMD ["nginx" , "-g" , "daemon off;" ]
You can’t perform that action at this time.
0 commit comments