[SOLVED] Lifecycle hooks: rails db:migrate (Mastodon), docker-compose.yml #1873
-
I am running the Mastodon image through the official This has worked great, but I would like to automate point releases ( However, with Mastodon I don't know how to integrate Normally, I would run:
Can I use Lifecycle hooks for this? .. e.g. maybe adding to the
.. but then I would expect that the Is there another way to integrate running There is a image linuxserver . This adds a "db:prepare" step, which runs "db:migrate" if the DB already exists. It runs the command when the container starts up. However, I don't want to use a different docker image and I don't want to build/modify the image myself. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
The label you want to set is Perhaps you can just change the run command in the docker-compose.yml to:
Which would always try to migrate before starting the main application. |
Beta Was this translation helpful? Give feedback.
I finally decided to include a simply cron job, instead of Watchtower: