Skip to content

Commit f707ad5

Browse files
committed
readd kamal secrets
1 parent 162a6b2 commit f707ad5

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ to-api-prompt
1919
infos/
2020
api-prompts/
2121
.DS_Store
22-
secrets
2322

2423
# User-specific files
2524
*.suo

.kamal/hooks/secrets

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Secrets defined here are available for reference under registry/password, env/secret, builder/secrets,
2+
# and accessories/*/env/secret in config/deploy.yml. All secrets should be pulled from either
3+
# password manager, ENV, or a file. DO NOT ENTER RAW CREDENTIALS HERE! This file needs to be safe for git.
4+
5+
# Option 1: Read secrets from the environment
6+
KAMAL_REGISTRY_PASSWORD=$KAMAL_REGISTRY_PASSWORD
7+
KAMAL_REGISTRY_USERNAME=$KAMAL_REGISTRY_USERNAME
8+
POSTGRES_PASSWORD=$DB_PASSWORD
9+
10+
# Option 2: Read secrets via a command
11+
# RAILS_MASTER_KEY=$(cat config/master.key)
12+
13+
# Option 3: Read secrets via kamal secrets helpers
14+
# These will handle logging in and fetching the secrets in as few calls as possible
15+
# There are adapters for 1Password, LastPass + Bitwarden
16+
#
17+
# SECRETS=$(kamal secrets fetch --adapter 1password --account my-account --from MyVault/MyItem KAMAL_REGISTRY_PASSWORD RAILS_MASTER_KEY)
18+
# KAMAL_REGISTRY_PASSWORD=$(kamal secrets extract KAMAL_REGISTRY_PASSWORD $SECRETS)
19+
# RAILS_MASTER_KEY=$(kamal secrets extract RAILS_MASTER_KEY $SECRETS)

0 commit comments

Comments
 (0)