Skip to content

Commit 492fc58

Browse files
committed
485
1 parent 618126c commit 492fc58

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

.kamal/secrets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ KAMAL_REGISTRY_PASSWORD=$KAMAL_REGISTRY_PASSWORD
1616
# Improve security by using a password manager. Never check config/master.key into git!
1717
RAILS_MASTER_KEY=$(cat config/master.key)
1818
POSTGRES_PASSWORD=$(bin/rails runner "puts Rails.application.credentials.dig(:postgres, :password)")
19+
POSTGRES_PASS=$(bin/rails runner "puts Rails.application.credentials.dig(:postgres, :password)")
1920
MINIO_ROOT_USER=$(bin/rails runner "puts Rails.application.credentials.dig(:minio, :root_user)")
2021
MINIO_ROOT_PASSWORD=$(bin/rails runner "puts Rails.application.credentials.dig(:minio, :root_password)")

config/deploy.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ env:
5959
# Aliases are triggered with "bin/kamal <alias>". You can overwrite arguments on invocation:
6060
# "bin/kamal logs -r job" will tail logs from the first server in the job section.
6161
aliases:
62-
console: app exec --interactive --reuse "bin/rails console"
62+
console: app exec --interactive --reuse "bin/rails console --sandbox"
6363
shell: app exec --interactive --reuse "bash"
6464
logs: app logs -f
6565
dbc: app exec --interactive --reuse "bin/rails dbconsole"
@@ -116,6 +116,21 @@ accessories:
116116
directories:
117117
- data:/var/lib/postgresql/data
118118

119+
postgres_backup:
120+
image: kartoza/pg-backup:17-3.5
121+
host: 192.168.1.217
122+
env:
123+
clear:
124+
POSTGRES_USER: example
125+
POSTGRES_DB: example_production
126+
POSTGRES_HOST: 192.168.1.217
127+
POSTGRES_PORT: 5432
128+
CRON_SCHEDULE: "*/10 * * * *"
129+
secret:
130+
- POSTGRES_PASS
131+
directories:
132+
- backups:/backups
133+
119134
minio:
120135
image: minio/minio
121136
host: 192.168.1.218

0 commit comments

Comments
 (0)