The Dockerfile provides a basic image based on ruby.
The docker-compose.yml provides the following services:
- a
webservice serving your rails application (built from Dockerfile) - a
webpack_dev_serverservice serving your assets from webpack (built from Dockerfile) - a
redisserver (built from officialredisdocker image) - a
database' server (built from officialpostgresql` docker image)
You can change database name in .env/development/database.
-- config/database.yml
default: &default
adapter: postgresql
encoding: unicode
# For details on connection pooling, see Rails configuration guide
# https://guides.rubyonrails.org/configuring.html#database-pooling
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
host: <%= ENV.fetch("DATABASE_HOST") %>
username: <%= ENV.fetch("POSTGRES_USER") %>
password: <%= ENV.fetch("POSTGRES_PASSWORD") %>
database: <%= ENV.fetch("POSTGRES_DB") %>
variables:
statement_timeout: 5000