-
Notifications
You must be signed in to change notification settings - Fork 999
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
Fixes #38274 - Updated docker-compose.yml that fixes the issues outli… #10472
base: develop
Are you sure you want to change the base?
Conversation
environment: | ||
- POSTGRES_USER=foreman |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still like the dedicated user just for Foreman. That's closer to what we have in production
test: ["CMD-SHELL", "nc -z 127.0.0.1 5432 || exit 1"] | ||
interval: 30s | ||
timeout: 30s | ||
test: ["CMD-SHELL", "pg_isready"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL: pg_isready exists. Nice
- /bin/bash | ||
- -c | ||
- | | ||
bundle exec bin/rake db:reset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this wipe the DB on every restart? I don't like that if I'm honest. Too easy to lose work.
- RAILS_MAX_THREADS=5 | ||
- RAILS_ENV=production | ||
- FOREMAN_FQDN=foreman.example.com | ||
- FOREMAN_DOMAIN=example.com | ||
- FOREMAN_RAILS_CACHE_STORE_TYPE=redis | ||
- FOREMAN_RAILS_CACHE_STORE_URLS=redis://redis-cache:6379/0 | ||
- DYNFLOW_REDIS_URL=redis://redis-tasks:6379/0 | ||
- REDIS_PROVIDER=DYNFLOW_REDIS_URL | ||
- REDIS_PROVIDER=$DYNFLOW_REDIS_URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is right. Looking at https://github.com/sidekiq/sidekiq/blob/77c6052e4d2d9ccc26457b4a2d629c33a9456664/lib/sidekiq/redis_connection.rb#L93-L98 it should be the name of the env var that contains the real URL.
hostname: orchestrator.example.com | ||
ports: [] | ||
## Not required | ||
# orchestrator: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and the worker are needed for tasking.
…ned in bug.
Fixes #38274 - Updated docker-compose.yml that fixes the issues outlined in bug.
https://projects.theforeman.org/issues/38274
Fixes app services exiting with error multiple PG::UndefinedTable: errors by moving the database creation to the app service. The database is dropped (if exists), recreated and configured by foreman to ensure all tables are created successfully.