I am migrating an existing rails application to docker and docker-compose. There are several scripts that need to be run only when creating containers, for example a script that copies prod db in that and indexes it in Elasticsearch.
From now on, when I launch containers locally for development, I only want to start the rail development server, and not all db initialization scripts. I could make two files for linking dockers (e.g. init and run ) that are the same except for the command: option command: in the webapp container.
Is there a better way?
source share