Skip to content

Commit

Permalink
Merge pull request #1 from scott/auto-set-rails-secret-by-default
Browse files Browse the repository at this point in the history
Auto set rails secret with optional values override
  • Loading branch information
scott authored Oct 20, 2021
2 parents 29b3595 + ab7c859 commit 019a8a2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/helpy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: helpy
description: Installs a production cluster of Helpy or Helpy Pro
type: application
version: 1.2.1
version: 1.2.2
appVersion: "3.2.7"
home: https://helpy.io/
sources:
Expand Down
4 changes: 4 additions & 0 deletions charts/helpy/templates/configs/env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ data:
POSTGRES_USER: "{{ .Values.postgres.user }}"
POSTGRES_PASSWORD: "{{ .Values.postgres.password }}"
{{ end }}
{{ if .Values.rails.secretKey }}
SECRET_KEY_BASE: "{{ .Values.rails.secretKey }}"
{{ else }}
SECRET_KEY_BASE: "{{ randAlphaNum 120 }}"
{{ end }}
REMOTE_STORAGE: "{{ .Values.storage.remote }}"
S3_KEY: "{{ .Values.storage.key }}"
S3_SECRET: "{{ .Values.storage.secret }}"
Expand Down
2 changes: 1 addition & 1 deletion charts/helpy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ rails:
serveStaticFiles: false
pumaConcurency: '1'
podRam: '1024'
secretKey: 'your_secret'
secretKey: ''
sessionDuration: 20
sessionStore: 'cookie'

Expand Down
10 changes: 6 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ To run a Helpy CE instance, use the following:
This Helm chart is intended to be highly configurable for different needs:

Configuring SSL: https://github.com/scott/helpy-helm/wiki/Enable-SSL
Variables:

### Variables:

| Variable | Description | Default Value
|-------------------------------|---------------------------------------------------------------|----------|
Expand All @@ -47,15 +48,16 @@ Variables:
| ingress.tls
| loadBalancer.enabled | Whether or not to use a LB | true |
| loadBalancer.annotations | Annotations to pass to the Load Balancer | {} |
| loadBalancer.externalTrafficPolicy | The type of load balancer | Cluster |
| Helpy Pod/Rails configurations| Use these settings to adjust how the app runs and resources expected in the pod | |
| rails.railsEnv | The environment to run the app in | production |
| rails.logToStandardOut | | true |
| rails.serveStaticFiles | Whether or not to serve static files. | false |
| rails.pumaConcurency | | '1' |
| rails.podRam | How much RAM to give each app POD in the cluster | '2048' |
| rails.secretKey | The secret key Rails uses | 'your_secret_here' |
| rails.sessionDuration | PRO Only. The numnber of minutes the session is kept alive | 20
| rails.sessionStore | PRO Only. The rails session store to use. | 'cookie'
| rails.secretKey | The secret key Rails uses. Uses a random string by default | '' |
| rails.sessionDuration | PRO Only. The number of minutes the session is kept alive | 20 |
| rails.sessionStore | PRO Only. The rails session store to use. | 'cookie' |
| rails.secretKey | The secret key Rails uses | 'your_secret_here' |
| Redis Configuration |
| redis.url | The URL to your redis service | 'redis://redis.default.svc.cluster.local:6379/0/cache' |
Expand Down

0 comments on commit 019a8a2

Please sign in to comment.