Skip to content

Commit

Permalink
Merge pull request #17 from scroll-tech/add-frontend-variables
Browse files Browse the repository at this point in the history
add .env file to frontend
  • Loading branch information
sbaizet-ledger authored May 31, 2024
2 parents 687d5f2 + 1338c6f commit fcd89e8
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 2 deletions.
Empty file.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
.idea
genesis.json
config-contracts.toml
charts/scroll-stack/*.json
charts/scroll-stack/*.json
.env.frontend
15 changes: 15 additions & 0 deletions charts/scroll-stack/charts/frontends/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ image:
pullPolicy: Always
tag: 2.2.4

command:
[
"/bin/bash",
"-c",
"cp /app/conf/.env.frontend /usr/share/nginx/html/.env && \
/usr/local/bin/entrypoint.sh"
]

service:
main:
enabled: true
Expand All @@ -28,6 +36,13 @@ resources:
memory: "500Mi"
cpu: "100m"

persistence:
*app_name:
enabled: yes
type: configMap
mountPath: /app/conf/
name: frontends-config

defaultProbes: &default_probes
enabled: true
custom: true
Expand Down
11 changes: 11 additions & 0 deletions charts/scroll-stack/templates/config-file-for-services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,14 @@ data:
{{ (.Files.Glob "coordinator-config.json").AsConfig | indent 2 }}
---
{{- end }}
{{- if index .Values "frontends" "enabled" }}
apiVersion: v1
kind: ConfigMap
metadata:
labels:
{{- include "scroll-stack.labels" $ | nindent 4 }}
name: frontends-config
data:
{{ (.Files.Glob ".env.frontend").AsConfig | indent 2 }}
---
{{- end }}
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Run the following script to get the dependencies of each helm charts
Run this command to generate config.toml file and genesis file
```bash
cd charts/scroll-stack
time docker run --rm -it -v .:/contracts/volume scrolltech/scroll-stack-contracts:gen-configs-e2b87879
time docker run --rm -it -v .:/contracts/volume scrolltech/scroll-stack-contracts:gen-configs-2b5b82d4
```

## Launch scroll-stack
Expand Down

0 comments on commit fcd89e8

Please sign in to comment.