Skip to content

Commit 1883008

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

File tree

5 files changed

+20
-15
lines changed

5 files changed

+20
-15
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# Ignore all default key files.
1414
/config/master.key
1515
/config/credentials/*.key
16+
/config/keys/*
1617

1718
# Ignore all logfiles and tempfiles.
1819
/log/*

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@
55
KAMAL_REGISTRY_PASSWORD=$KAMAL_REGISTRY_PASSWORD
66
POSTGRES_PASSWORD=$POSTGRES_PASSWORD
77
RAILS_MASTER_KEY=$(cat config/master.key)
8+
HEALTH_CARDS_HOST=$HEALTH_CARDS_HOST
9+
HEALTH_CARDS_KEY_PEM=$(cat config/keys/health_cards.pem)
10+
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: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,11 @@ registry:
3434
# Inject ENV variables into containers (secrets come from .kamal/secrets).
3535
env:
3636
secret:
37-
- RAILS_MASTER_KEY
37+
- HEALTH_CARDS_HOST
38+
- HEALTH_CARDS_KEY_PEM
3839
- POSTGRES_PASSWORD
40+
- RAILS_MASTER_KEY
41+
- WEBAUTHN_ORIGIN
3942
clear:
4043
# Run the Solid Queue Supervisor inside the web server's Puma process to do jobs.
4144
# When you start using multiple servers, you should split out job processing to a dedicated machine.
@@ -48,10 +51,8 @@ env:
4851
# WEB_CONCURRENCY: 2
4952

5053
# 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
54+
# Use open-lis-db for a db accessory server on same machine via local kamal docker network.
5355
DB_HOST: open-lis-db
54-
POSTGRES_USER: open_lis
5556

5657
# Log everything from Rails
5758
# RAILS_LOG_LEVEL: debug
@@ -68,24 +69,24 @@ aliases:
6869
# Use a persistent storage volume for sqlite database files and local Active Storage files.
6970
# Recommended to change this to a mounted volume path that is backed up off server.
7071
# volumes:
71-
# - "open_lis_storage:/rails/storage"
72+
# - "open-lis_storage:/rails/storage"
7273

7374

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

7980
# Configure the image builder.
8081
builder:
8182
arch: arm64
8283

83-
# # Build image via remote server (useful for faster amd64 builds on arm64 computers)
84+
# Build image via remote server (useful for faster amd64 builds on arm64 computers)
8485
# remote: ssh://docker@docker-builder-server
85-
#
86-
# # Pass arguments and secrets to the Docker build process
86+
87+
# Pass arguments and secrets to the Docker build process
8788
# args:
88-
# RUBY_VERSION: 3.4.3
89+
# RUBY_VERSION: 3.4.4
8990
# secrets:
9091
# - GITHUB_TOKEN
9192
# - RAILS_MASTER_KEY
@@ -97,9 +98,9 @@ builder:
9798
# Use accessory services (secrets come from .kamal/secrets).
9899
accessories:
99100
db:
100-
image: postgres:17.0
101-
host: 192.0.2.2
102-
port: "127.0.0.1:5432:5432"
101+
image: postgres:17
102+
host: 192.0.2.1
103+
port: "127.0.0.1:5432:5432 --publish [::1]:5432:5432"
103104
env:
104105
clear:
105106
POSTGRES_DB: open_lis_production

config/initializers/smart_health_cards.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Rails.application.configure do
2-
config.hc_key_path = ENV.fetch("HEALTH_CARDS_KEY_PATH", "config/keys/health_cards.pem")
2+
config.hc_key_path = ENV.fetch("HEALTH_CARDS_KEY_PEM", "config/keys/health_cards.pem")
33
FileUtils.mkdir_p(File.dirname(config.hc_key_path))
44
kp = HealthCards::PrivateKey.load_from_or_create_from_file(config.hc_key_path)
55

0 commit comments

Comments
 (0)