Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

Commit 944a84d

Browse files
committed
Make "db/" into a volume inside the Docker container
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
1 parent 0cdb946 commit 944a84d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,10 @@ RUN chmod 0755 bin/*
5858
COPY --chown=ruby:ruby --from=build /usr/local/bundle /usr/local/bundle
5959
COPY --chown=ruby:ruby --from=build /app /app
6060

61-
RUN mkdir -p "/app/tmp/" && chown ruby:ruby "/app/tmp/"
61+
RUN mkdir -p "/app/tmp/" && chown ruby:ruby "/app/tmp/" && chown ruby:ruby "/app/db/"
6262
VOLUME "/tmp/"
6363
VOLUME "/app/tmp/"
64+
VOLUME "/app/db/"
6465

6566
EXPOSE 9292
6667

0 commit comments

Comments
 (0)