Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
Emergency patch for Tornjak Frontend (#319)
Browse files Browse the repository at this point in the history
Tornjak Frontend serves incorrect dashboard due to restricted namespace.
Fixing the cache file location leads to this error:
```Error: EACCES: permission denied, open './build/env.js'```

Solution, to redirect the env.js output to writeable space e.g. /tmp

Signed-off-by: Mariusz Sabath <mrsabath@gmail.com>
Co-authored-by: Faisal Memon <fymemon@yahoo.com>
  • Loading branch information
mrsabath and faisal-memon committed May 27, 2023
1 parent ed172e4 commit d83d6a8
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
command:
- /bin/sh
- -c
- |
ln -s /tmp/env.js build/env.js
npx react-inject-env set -n /tmp/env.js
serve -s build -p $PORT_FE
ports:
- name: http
containerPort: 3000
Expand All @@ -52,7 +59,7 @@ spec:
{{- end }}
volumeMounts:
- name: cache
mountPath: /usr/src/app/
mountPath: /usr/src/app/node_modules/.cache
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down

0 comments on commit d83d6a8

Please sign in to comment.