@@ -157,18 +157,44 @@ For deployed version use the Uri of your app.
157
157
158
158
To build and run the app with API proxy:
159
159
160
- ```
161
- docker build -t copilot-metrics-viewer-with-api -f api.Dockerfile .
160
+ ``` bash
161
+ docker build -t copilot-metrics-viewer-with-proxy -f api.Dockerfile .
162
162
```
163
163
164
164
To run:
165
165
166
+ ``` bash
167
+ docker run -it --rm -p 8080:3000 --env-file ./.env copilot-metrics-viewer-with-proxy
166
168
```
167
- docker run -it --rm -p 8080:3000 --env-file ./.env copilot-metrics-viewer-with-api
169
+
170
+ Proxy can also run with token hardcoded on the backend (which hides it from frontend calls), here's a sample:
171
+
172
+ ``` bash
173
+ docker run -it --rm -p 3000:3000 \
174
+ -e VUE_APP_SCOPE=enterprise \
175
+ -e VUE_APP_GITHUB_API=/api/github \
176
+ -e VUE_APP_GITHUB_ENT=< enterprise name> \
177
+ -e VUE_APP_GITHUB_TOKEN=< github PAT> \
178
+ -e SESSION_SECRET=< random string> \
179
+ copilot-metrics-viewer-with-proxy
180
+ ```
181
+
182
+ or
183
+
184
+ ``` bash
185
+ docker run -it --rm -p 3000:3000 \
186
+ -e VUE_APP_SCOPE=organization \
187
+ -e VUE_APP_GITHUB_API=/api/github \
188
+ -e VUE_APP_GITHUB_ORG=< org name> \
189
+ -e VUE_APP_GITHUB_TOKEN=< github PAT> \
190
+ -e SESSION_SECRET=< random string> \
191
+ copilot-metrics-viewer-with-api
168
192
```
169
193
170
194
### Github App Registration
171
195
196
+ While it is possible to run API Proxy without GitHub app registration and with hardcoded token, it's the recommended way.
197
+
172
198
Go to Organization -> Settings -> Developer Settings section -> GitHub Apps -> New GitHub App
173
199
174
200
Replace <your org > with your organization name in the link:
@@ -230,7 +256,6 @@ docker run -it --rm -p 3000:3000 \
230
256
ghcr.io/karpikpl/copilot-metrics-viewer-with-proxy
231
257
```
232
258
233
-
234
259
## License
235
260
236
261
This project is licensed under the terms of the MIT open source license. Please refer to [ MIT] ( ./LICENSE.txt ) for the full terms.
0 commit comments