Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating Secrets & Git Ignore (#3776) #3780

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ node_modules
yarn-error.log
playbook/stats.json
*.dec.*
.env
1 change: 1 addition & 0 deletions playbook-website/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ yarn-debug.log*
# Vite uses dotenv and suggests to ignore local-only env files. See
# https://vitejs.dev/guide/env-and-mode.html#env-files
*.local
.env

4 changes: 4 additions & 0 deletions playbook-website/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ class Application < Rails::Application
# config.eager_load_paths << Rails.root.join("extras")

# Don't generate system test files.

config.generators.system_tests = nil

openai_api_key = ENV["OPENAI_API_KEY"]
Rails.application.config.openai_api_key = openai_api_key
end
end
6 changes: 3 additions & 3 deletions playbook-website/config/deploy/prs/secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
appConfig:
secretKeyBase: ENC[AES256_GCM,data:ydJ6vKcPVMp9SxRCxgKH3AgAX5JjeoGn7fDKf77XkhODoTZnRHpkyiAezdhFhakCajJFHmaOttWytEVJiMg9DoW111f4AWsNQ+awVztblsCUmT1ZPgZtAGH8H76RKzl3adRy466E3FFoBzQf2FZhP5fdDRSmhzlHWUZdtrfDt/g=,iv:fDmiR4EzqRJ72pl4xLjG5Lv3bw6ijE7hqDHY9HqBcF8=,tag:vzpbilZlEFKlKrt9Rl9zvA==,type:str]
sentry_dsn: ENC[AES256_GCM,data:ufQrClZMvpS72OLyRqlO4jisNfnC793ASma61YUOssmQ2gUb/H/U5loD731e4a1fI6dADN66cjQbEnBGwNz0tU58dPMFlR5wSf+bs+JH2Jgn+w==,iv:m3oKFJrByerC7/DPezR0j98Jsolqp8IOm67trL0zJwc=,tag:JAGhc5ts+QBO+DDttXgSVw==,type:str]
open_ai: ENC[AES256_GCM,data:zVXNbSHsux6JriiGW50+nApdnFZ88wO9pqIc/gOPf51zjKYPH8VZ0zNNXyE2McwZdWI7XqcNuUKFQdMZXl9sWZqfNV4cyrVXc4/XwRscv4yzY+PNKlHmCrI+s/rrqrnOkdMrpf68Vud0ifjuA+0c5YVeCWheSuc44S+XufG/ZxjIwFuQlxNn8pQvFsI3gDkc8UF1v+a0+Umh2fms5ybkOoTnEzFI04HlMak=,iv:CbZdq8QY413G8mwRiIstLrMM9tCIpw1J1pd7sGczSds=,tag:bga4kHU2AxqAtymi4EwXUw==,type:str]
open_ai: ENC[AES256_GCM,data:duAVK9S9gDz3XkzzP7b/mfUuOU+PEGTXXL9e7y8puhs1eJbaCTavKpdWeRJLlGZEDTW3KlyBl/WBcfSRrPEwIX4BOqiiYUin2TwTSyhsGIenUbka05CalBmq1T/H0Js=,iv:GP0Ug3Z0iWP8cpeFOyG6eyuovcfNs1K7/Q7CoNsZXZU=,tag:IH1NqrIksHBgRjpUv4sTLA==,type:str]
sops:
kms:
- arn: arn:aws:kms:us-east-1:205083374951:key/d46e780d-ee0a-4a7d-b049-0443e1b91d41
Expand All @@ -17,8 +17,8 @@ sops:
azure_kv: []
hc_vault: []
age: []
lastmodified: "2024-10-07T19:35:37Z"
mac: ENC[AES256_GCM,data:dCiQ3NiH/4kqwVYLyk54SY1RzDffQMmbGx5diR2EyvktuqUpcRgx0TpUkMO4calsKwxv7ujffDpuo+CT2eNjt/b5Thuu6VUYqTr76jqeoyDWAZ4m0EA4q9Gz5Q4n1Y4FPEkhBAmaNfcWERV9zDOgTjdbG3IYEdKgKORHpSEUE4E=,iv:Rx966gFBzEdqynjMsaS5H+YiYDQjKm1IXQah8sK2+hk=,tag:YYVxK7SRk5YLkyJ5KdL0/g==,type:str]
lastmodified: "2024-10-08T14:44:56Z"
mac: ENC[AES256_GCM,data:lABCE3dB+TN7l0SB13j0/pEE++5wYiL7Hr7yC93S7q6ehFXpPQBXHzZnWJnFzW2+Qi774hR5C04jypCWpcrbNr6hb6l8EM27ssp1NJFC/SBGdPaLgUiiuJcHoCGfhF0T4VgaYZc/sATiYCyfvQn9h9W7+XkakCQyD5GVuqXf07c=,iv:gxeGlWZEtVHO68kAtdz7bJCNGzbcanUzqX73lYeDMwo=,tag:5z//KnPmKcWdWhc9yGBLNg==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.7.3
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ spec:
secretKeyRef:
name: playbook
key: sentry-dsn
- name: OPEN_AI
valueFrom:
secretKeyRef:
name: playbook
key: open-ai
livenessProbe:
httpGet:
path: /health_check/site
Expand Down
1 change: 1 addition & 0 deletions playbook-website/config/deploy/templates/secret.yaml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ type: Opaque
data:
secret-key-base: <%= Base64.encode64(appConfig.fetch("secretKeyBase")).gsub("\n", "").strip %>
sentry-dsn: <%= Base64.encode64(appConfig.fetch("sentry_dsn")).gsub("\n", "").strip %>
open-ai: <%= Base64.encode64(appConfig.fetch("open_ai")).gsub("\n", "").strip %>
5 changes: 5 additions & 0 deletions playbook-website/config/deploy/templates/shell.yaml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ template:
value: "true"
- name: RAILS_LOG_TO_STDOUT
value: "true"
- name: OPEN_AI
valueFrom:
secretKeyRef:
name: playbook
key: open-ai
resources:
limits:
cpu: 0.3
Expand Down
3 changes: 3 additions & 0 deletions playbook-website/config/initializers/openai.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# frozen_string_literal: true

Rails.application.config.openai_api_key = ENV["OPENAI_API_KEY"]
Loading