Daniel Kantor
commited on
Commit
·
c552f2e
1
Parent(s):
00c1d92
- Dockerfile +2 -2
- docker-compose.yml +1 -0
- frontend/src/config/auth.js +1 -1
Dockerfile
CHANGED
@@ -54,8 +54,8 @@ ENV HF_HOME=/app/.cache \
|
|
54 |
PORT=7860 \
|
55 |
NODE_ENV=production
|
56 |
|
57 |
-
ARG
|
58 |
-
ENV REACT_APP_OAUTH_CLIENT_ID=$
|
59 |
|
60 |
# Note: HF_TOKEN should be provided at runtime, not build time
|
61 |
USER user
|
|
|
54 |
PORT=7860 \
|
55 |
NODE_ENV=production
|
56 |
|
57 |
+
ARG REACT_APP_OAUTH_CLIENT_ID
|
58 |
+
ENV REACT_APP_OAUTH_CLIENT_ID=$REACT_APP_OAUTH_CLIENT_ID
|
59 |
|
60 |
# Note: HF_TOKEN should be provided at runtime, not build time
|
61 |
USER user
|
docker-compose.yml
CHANGED
@@ -28,6 +28,7 @@ services:
|
|
28 |
- NODE_ENV=${ENVIRONMENT:-development}
|
29 |
- CHOKIDAR_USEPOLLING=true
|
30 |
- PORT=${FRONTEND_PORT:-7861}
|
|
|
31 |
command: npm start
|
32 |
stdin_open: true
|
33 |
tty: true
|
|
|
28 |
- NODE_ENV=${ENVIRONMENT:-development}
|
29 |
- CHOKIDAR_USEPOLLING=true
|
30 |
- PORT=${FRONTEND_PORT:-7861}
|
31 |
+
- REACT_APP_OAUTH_CLIENT_ID=${OAUTH_CLIENT_ID:-unset}
|
32 |
command: npm start
|
33 |
stdin_open: true
|
34 |
tty: true
|
frontend/src/config/auth.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
console.log(JSON.stringify(process.env));
|
2 |
|
3 |
export const HF_CONFIG = {
|
4 |
-
CLIENT_ID: process.env.
|
5 |
STORAGE_KEY: "hf_oauth",
|
6 |
SCOPE: "openid profile",
|
7 |
PROD_URL: "https://huggingface.co/spaces/stacklok/llm-security-leaderboard",
|
|
|
1 |
console.log(JSON.stringify(process.env));
|
2 |
|
3 |
export const HF_CONFIG = {
|
4 |
+
CLIENT_ID: process.env.REACT_APP_OAUTH_CLIENT_ID,
|
5 |
STORAGE_KEY: "hf_oauth",
|
6 |
SCOPE: "openid profile",
|
7 |
PROD_URL: "https://huggingface.co/spaces/stacklok/llm-security-leaderboard",
|