retrospring/config/database.yml.postgres
Dominik M. Kwiatek c292f51957
Set up GitHub Actions (#72)
* Add GitHub Actions config

* Add extra dependencies and use environment variable for DB config

Moved the env vars up to outside of the postgres service so this might not work

* Pass environment variables for Postgres credentials to Postgres container

* Pass service ports to application

Have a suspicion that Redis one won't work as justask.yml is probably not using ERB

* Add database.yml.postgres with port

* Cache gems; pass Redis URL as env var

* Add host to DB config

* Pass DB credentials for db:setup

* Use 127.0.0.1 instead of localhost to force TCP; Use bundler config without instead of --without

* I can't read 🗑

* 🤔

* 💻🔨 I have no idea what I'm doing…

* Testing env defined outside steps

* Move templated vars down

* Add build badge
2020-04-20 21:02:48 +01:00

36 lines
823 B
Text

#
# PRODUCTION
#
production:
adapter: postgresql
encoding: unicode
database: justask_production
pool: 25
# username: justask
# password:
# host: localhost
# port: 5432
#
# Development specific
#
development:
adapter: postgresql
encoding: unicode
database: justask_development
pool: 5
username: postgres
password:
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test: &test
adapter: postgresql
encoding: unicode
database: <%= ENV['POSTGRES_DB'] %>
host: <%= ENV.fetch('POSTGRES_HOST', 'localhost') %>
pool: 5
username: <%= ENV['POSTGRES_USER'] %>
password: <%= ENV['POSTGRES_PASSWORD'] %>
port: <%= ENV.fetch('POSTGRES_PORT', 5432) %>