Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should really Dockerfile apply migrations? #52

Open
StreakyCobra opened this issue Nov 24, 2017 · 2 comments
Open

Should really Dockerfile apply migrations? #52

StreakyCobra opened this issue Nov 24, 2017 · 2 comments

Comments

@StreakyCobra
Copy link
Owner

RUN python manage.py migrate

Not sure Dockerfile should apply migrations.

@johnrlive
Copy link

What are the disadvantages of having docker apply the migrations?

@StreakyCobra
Copy link
Owner Author

When a person builds a docker container, he probably think of it has a safe operation that does not modify stuffs outside the container. Now if for any reason the code is modified to connect to an online database, running the migrate command will migrate and modify the online database. This can be dangerous at it may be used by another raposfly instance running in production for example, and people will not think of it as a side effect when running docker build.

I think the migration should be handled in another way, I'm not sure which one yet, but I'll think about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants