File tree 6 files changed +20
-18
lines changed 6 files changed +20
-18
lines changed Original file line number Diff line number Diff line change @@ -76,25 +76,19 @@ jobs:
76
76
username : ${{ github.actor }}
77
77
password : ${{ secrets.GITHUB_TOKEN }}
78
78
79
- - name : Build the base Docker image
80
- uses : docker/build-push-action@v5
81
- with :
82
- context : .
83
- cache-from : type=registry,ref=ghcr.io/filecoin-station/core
84
- cache-to : type=inline
85
- tags : spark-api-base
86
-
87
79
- name : Build spark-api Docker image
88
80
uses : docker/build-push-action@v5
89
81
with :
90
- context : spark-api
82
+ context : .
83
+ build-args : " SERVICE=api"
91
84
cache-from : type=registry,ref=ghcr.io/filecoin-station/core
92
85
cache-to : type=inline
93
86
94
87
- name : Build spark-publish Docker image
95
88
uses : docker/build-push-action@v5
96
89
with :
97
- context : spark-publish
90
+ context : .
91
+ build-args : " SERVICE=publish"
98
92
cache-from : type=registry,ref=ghcr.io/filecoin-station/core
99
93
cache-to : type=inline
100
94
Original file line number Diff line number Diff line change @@ -37,3 +37,13 @@ FROM base
37
37
38
38
# Copy built application
39
39
COPY --from=build /app /app
40
+
41
+ # Set to `publish` or `api`
42
+ # This argument controls what npm script is executed as the CMD.
43
+ ARG SERVICE
44
+
45
+ # ARGs are not preserved at runtime, we need to store the value
46
+ # as a default value of an ENV var
47
+ ENV SCRIPT="start:${SERVICE}"
48
+
49
+ CMD npm run ${SCRIPT}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ processes = []
13
13
DOMAIN = " api.filspark.com"
14
14
REQUEST_LOGGING = " false"
15
15
16
+ [build .args ]
17
+ SERVICE =api
18
+
16
19
[experimental ]
17
20
auto_rollback = true
18
21
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -5,5 +5,8 @@ primary_region = "cdg"
5
5
SENTRY_ENVIRONMENT =" production"
6
6
MAX_MEASUREMENTS_PER_ROUND =" 100000"
7
7
8
+ [build .args ]
9
+ SERVICE =api
10
+
8
11
[deploy ]
9
12
strategy = " rolling"
You can’t perform that action at this time.
0 commit comments