fablabbcn / smartcitizen-api

The Smart Citizen Engine
https://developer.smartcitizen.me
GNU Affero General Public License v3.0
10 stars 4 forks source link

Add migrations to Dockerfile(s) #250

Closed oscgonfer closed 7 months ago

oscgonfer commented 1 year ago

Review the need to add migrations to Dockerfiles to avoid running them from console.

oscgonfer commented 9 months ago

@timcowlishaw do you think this can be covered in parallel to the refactor branch or would you rather keep it manually?

oscgonfer commented 7 months ago

Discussion on the viability of this: https://github.com/fablabbcn/smartcitizen-api/pull/298

I am now more inclined to not run the migrations on the Dockerfile, specially since we do not envision this to be done often by users at the moment (maybe never). Since most of the time, we are going to be doing this ourselves, we are OK without the migration in the Dockerfile. We can, however, potentially to simply add a warning if there are migrations pending after the rake db:migrate:status.

As much as I would like everyone to do this, reality is that we are not there. However, I would be very happy to discuss if want to pursue such strategy. This involves several parts, like promoting, or testing it, but all of them would pass by documenting better the stack and make it more usable by others.