Fix/fresh start#121
Open
juanfernandezgullermo wants to merge 1 commit into
Open
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the auth-service docker-compose startup command to use Rails Sequence diagram for updated auth-service startup database preparationsequenceDiagram
participant DockerCompose
participant AuthServiceContainer
participant Rails
participant Postgres
DockerCompose->>AuthServiceContainer: start container
AuthServiceContainer->>Rails: bundle install
AuthServiceContainer->>Rails: rails db:prepare
Rails->>Postgres: create_database_if_needed
Rails->>Postgres: run_pending_migrations
AuthServiceContainer->>Rails: rails s -p 3001 -b 0.0.0.0
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider moving the long
bash -ccommand (PID removal, bundle install, db tasks, server start) into an entrypoint script to improve readability and maintainability of the docker-compose configuration. - Running
bundle installon every container startup can significantly slow boot and introduce variability; consider installing dependencies at image build time and removingbundle installfrom the runtime command.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider moving the long `bash -c` command (PID removal, bundle install, db tasks, server start) into an entrypoint script to improve readability and maintainability of the docker-compose configuration.
- Running `bundle install` on every container startup can significantly slow boot and introduce variability; consider installing dependencies at image build time and removing `bundle install` from the runtime command.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
eb09d78 to
c70b214
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Reverts PR #97. That PR replaced db:prepare with db:create && db:migrate as a workaround for non-idempotent migrations (issue #78). This PR restores db:prepare because:
Root cause fixed: auth-service migrations are now idempotent (see companion PR in evo-auth-service-community).
db:prepare is the Rails-recommended command for Docker: it auto-detects whether to create+load schema or just run pending migrations.
db:create && db:migrate replays all migrations from scratch on fresh start — slower and more fragile if any migration isn't perfectly idempotent.
Type of Change
Service(s) Affected
evo-auth-service-community)evo-ai-crm-community)evo-ai-frontend-community)evo-ai-processor-community)evo-ai-core-service-community)Checklist
Summary by Sourcery
Build: