Skip to content

Commit 8c88904

Browse files
authored
[FYST-2134] Set deploy_defaults for deployed databases (staging/production) (#29)
* Set deploy_defaults for deployed databases (staging/production)
1 parent dd7cbc8 commit 8c88904

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

config/database.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,26 @@ test:
1919
host: localhost
2020
port: 5432
2121

22+
deploy_default: &deploy_default
23+
<<: *default
24+
host: <%= ENV["DATABASE_HOST"] %>
25+
username: <%= ENV["DATABASE_USER"] %>
26+
password: <%= ENV["DATABASE_PASSWORD"] %>
27+
2228
# Store production database in the storage/ directory, which by default
2329
# is mounted as a persistent Docker volume in config/deploy.yml.
2430
production:
2531
primary:
26-
<<: *default
27-
database: storage/production.sqlite3
32+
<<: *deploy_default
2833
cache:
29-
<<: *default
30-
database: storage/production_cache.sqlite3
34+
<<: *deploy_default
3135
migrations_paths: db/cache_migrate
3236
queue:
33-
<<: *default
34-
database: storage/production_queue.sqlite3
37+
<<: *deploy_default
3538
migrations_paths: db/queue_migrate
3639
cable:
37-
<<: *default
38-
database: storage/production_cable.sqlite3
40+
<<: *deploy_default
3941
migrations_paths: db/cable_migrate
42+
43+
staging:
44+
<<: *deploy_default

0 commit comments

Comments
 (0)