February 2019
Intermediate to advanced
240 pages
5h 25m
English
Rails pioneered out-of-the-box support for multiple environments. How does this fit in with our Docker setup? We know that our production config will differ from that in development, but what settings do we need and how do we organize things?
Previously, we created the following file structure for our config:
| | $ tree .env |
| | .env |
| | └── development |
| | ├── database |
| | └── web |
| | |
| | 1 directory, 2 files |
Let’s create a copy of our development config as a starting point for our production config:
| | $ cp -r .env/development .env/production |
This should leave us with the following file structure:
| | $ tree .env |
| | .env |
| | ├── development |
| | │ ├── database |
| | │ └── web |
| | └── production |
| | ├── database |
| | └── web |
| |
Read now
Unlock full access