March 2025
Intermediate to advanced
472 pages
12h 10m
English
Before proceeding, let’s take one last look at the web service defined in the docker-compose.yml:
| | web: |
| | build: . |
| | volumes: |
| | - ./log:/rails/log |
| | - ./storage:/rails/storage |
| | ports: |
| | - "3000:3000" |
| | environment: |
| | - REDIS_URL=redis://redis-db:6379 |
| | - DATABASE_URL=postgres://root:password@postgres-db/ |
| | secrets: |
| | - source: master_key |
| | target: /rails/config/master.key |
| | depends_on: |
| | redis-db: |
| | condition: service_started |
| | postgres-db: |
| | condition: service_healthy |
We’ve seen the volumes definition before; in this case it maps the log directory in the container to our local log directory, and the storage directory in the container to our local storage directory. ...
Read now
Unlock full access