Skip to content
This repository was archived by the owner on Dec 3, 2019. It is now read-only.
This repository was archived by the owner on Dec 3, 2019. It is now read-only.

Run migrations on container start #61

Closed

Description

@rickr

Feature

Why is this feature being added?

Migrations currently have to be run manually once they hit production.

What should your feature do?

Create a script that will do any startup related tasks (eg rails db:migrate).
It should end with bundle exec puma -C config/puma.rb

Activity

  1. kirbyfern commented on Jun 20, 2017

    @kirbyfern
    Contributor

    Is this related to heroku threads? or Procfile if thats the case I can have this issue. Let me know if this is the Procfile and puma.rb

  2. rickr commented on Jun 20, 2017

    @rickr
    ContributorAuthor

    No - this will be a little shell script that's run as Docker's start script.

  3. kirbyfern commented on Jun 20, 2017

    @kirbyfern
    Contributor

    ok

  4. PSkaggs commented on Aug 27, 2017

    @PSkaggs
    Contributor

    I can do this.

  5. hpjaj commented on Oct 13, 2017

    @hpjaj
    Collaborator

    @PSkaggs - Are you still interested in taking this on? If yes, its yours! Just let us know so we can mark it as in progress.

  6. PSkaggs commented on Oct 13, 2017

    @PSkaggs
    Contributor

    Sure, I'll take it.

  7. hpjaj commented on Oct 13, 2017

    @hpjaj
    Collaborator

    @PSkaggs - it is yours!

  8. PSkaggs commented on Oct 19, 2017

    @PSkaggs
    Contributor

    @hpjaj I'm not sure what all you wanted with this feature. I currently have a script that runs migrations when starting the container. Did you want the database seeded as well?

  9. hpjaj commented on Oct 19, 2017

    @hpjaj
    Collaborator

    @PSkaggs - No, no seeding. Just want to make sure that the migrations are ran when the container starts.

  10. PSkaggs commented on Oct 20, 2017

    @PSkaggs
    Contributor

    I suppose I'm a little confused as to how you are running this in production. If you are using yarn then there is already a make db_migrate in the script. Unless you are just using make or docker-compose up --build or something similar? Anyway, I've got a PR for you that does what you want.

  11. hpjaj commented on Oct 20, 2017

    @hpjaj
    Collaborator

    As it stands today, we have to have someone manually run rake db:migrate in prod, after any PR's are merged with pending migrations.

    That said, this issue was requested by @rickr . That would be a good question for him, or perhaps @ohaiwalt .

    Either way, @ohaiwalt , can you please code review #186

  12. kylemh commented on Oct 23, 2017

    @kylemh
    Member

    @ohaiwalt does this maybe explain our server outage per build?

  13. ohaiwalt commented on Oct 29, 2017

    @ohaiwalt
    Member

    @kylemh negative, unrelated.

  14. hpjaj commented on Nov 23, 2017

    @hpjaj
    Collaborator

    Completed: #186

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions