Skip to content

Commit f36edf8

Browse files
committed
Kamal: Update configs
1 parent 5b3f791 commit f36edf8

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

.kamal/secrets-common renamed to .kamal/secrets

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# and accessories/*/env/secret in config/deploy.yml. All secrets should be pulled from either
33
# password manager, ENV, or a file. DO NOT ENTER RAW CREDENTIALS HERE! This file needs to be safe for git.
44

5+
HEALTH_CARDS_HOST=$HEALTH_CARDS_HOST
56
KAMAL_REGISTRY_PASSWORD=$KAMAL_REGISTRY_PASSWORD
67
POSTGRES_PASSWORD=$POSTGRES_PASSWORD
78
RAILS_MASTER_KEY=$(cat config/master.key)
9+
WEBAUTHN_ORIGIN=$WEBAUTHN_ORIGIN

config/database.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ test:
1515
production:
1616
primary: &primary_production
1717
<<: *default
18+
host: <%= ENV["DB_HOST"] %>
1819
database: open_lis_production
1920
username: open_lis
2021
password: <%= ENV["POSTGRES_PASSWORD"] %>
21-
host: <%= ENV["DB_HOST"] %>
2222
cache:
2323
<<: *primary_production
2424
database: open_lis_production_cache

config/deploy.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ registry:
3434
# Inject ENV variables into containers (secrets come from .kamal/secrets).
3535
env:
3636
secret:
37-
- RAILS_MASTER_KEY
37+
- HEALTH_CARDS_HOST
3838
- POSTGRES_PASSWORD
39+
- RAILS_MASTER_KEY
40+
- WEBAUTHN_ORIGIN
3941
clear:
4042
# Run the Solid Queue Supervisor inside the web server's Puma process to do jobs.
4143
# When you start using multiple servers, you should split out job processing to a dedicated machine.
@@ -48,10 +50,8 @@ env:
4850
# WEB_CONCURRENCY: 2
4951

5052
# Match this to any external database server to configure Active Record correctly
51-
# Use rails803-db for a db accessory server on same machine via local kamal docker network.
52-
# DB_HOST: 192.168.0.2
53+
# Use open-lis-db for a db accessory server on same machine via local kamal docker network.
5354
DB_HOST: open-lis-db
54-
POSTGRES_USER: open_lis
5555

5656
# Log everything from Rails
5757
# RAILS_LOG_LEVEL: debug
@@ -68,24 +68,24 @@ aliases:
6868
# Use a persistent storage volume for sqlite database files and local Active Storage files.
6969
# Recommended to change this to a mounted volume path that is backed up off server.
7070
# volumes:
71-
# - "open_lis_storage:/rails/storage"
71+
# - "open-lis_storage:/rails/storage"
7272

7373

7474
# Bridge fingerprinted assets, like JS and CSS, between versions to avoid
7575
# hitting 404 on in-flight requests. Combines all files from new and old
7676
# version inside the asset_path.
77-
# asset_path: /rails/public/assets
77+
asset_path: /rails/public/assets
7878

7979
# Configure the image builder.
8080
builder:
8181
arch: arm64
8282

83-
# # Build image via remote server (useful for faster amd64 builds on arm64 computers)
83+
# Build image via remote server (useful for faster amd64 builds on arm64 computers)
8484
# remote: ssh://docker@docker-builder-server
85-
#
86-
# # Pass arguments and secrets to the Docker build process
85+
86+
# Pass arguments and secrets to the Docker build process
8787
# args:
88-
# RUBY_VERSION: 3.4.3
88+
# RUBY_VERSION: 3.4.4
8989
# secrets:
9090
# - GITHUB_TOKEN
9191
# - RAILS_MASTER_KEY
@@ -97,9 +97,9 @@ builder:
9797
# Use accessory services (secrets come from .kamal/secrets).
9898
accessories:
9999
db:
100-
image: postgres:17.0
101-
host: 192.0.2.2
102-
port: "127.0.0.1:5432:5432"
100+
image: postgres:17
101+
host: 192.0.2.1
102+
port: "127.0.0.1:5432:5432 --publish [::1]:5432:5432"
103103
env:
104104
clear:
105105
POSTGRES_DB: open_lis_production

0 commit comments

Comments
 (0)