Make "db/" into a volume inside the Docker container#769
Conversation
AWS ECS docs [1] say that a file that exists in a directory that is subsequently marked as a volume will be copied to the host and remounted into the container. This is necessary for us to do with the "db/" directory because the "db:migrate" Rake task writes to "db/schema.rb" [1] https://docs.aws.amazon.com/AmazonECS/latest/developerguide/bind-mounts.html
|
lfdebrux
left a comment
There was a problem hiding this comment.
This is necessary for us to do with the "db/" directory because the "db:migrate" Rake task writes to "db/schema.rb"
That's surprising, I would have thought that db:migrate would write to db/schema.rb only if there are any changes 🤔
Oh well
That is true. We saw this on |
Hmm. Ideally there shouldn't be changes to |
That's .. concerning? Probably? We were seeing this in staging, and in review once we began running |
Yeah I saw that. It is concerning, but only slightly? Probably not something that needs to be fixed right this moment. |



What problem does this pull request solve?
Trello card: https://trello.com/c/KoHvaEUA/681-aws-m112-ecs-read-only-root-filesystem-configuration
AWS ECS docs [1] say that a file that exists in a directory that is subsequently marked as a volume will be copied to the host and remounted into the container.
This is necessary for us to do with the "db/" directory because the "db:migrate" Rake task writes to "db/schema.rb"
[1] https://docs.aws.amazon.com/AmazonECS/latest/developerguide/bind-mounts.html
Things to consider when reviewing