Skip to content

Commit

Permalink
Don't track * search
Browse files Browse the repository at this point in the history
  • Loading branch information
johnf committed Sep 10, 2024
1 parent fbfc0c0 commit da5ab35
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ bin/aws/ecs_rake searchkick:reindex
## Importing a production database into your development environment

``` bash
AWS_PROFILE=nabu-prod bin/aws/ecs_shell jobs -c 'mysqldump -u nabu -h "$NABU_DATABASE_HOSTNAME" -p"$NABU_DATABASE_PASSWORD" --single-transaction nabu | bzip2 | base64' | base64 -d > /tmp/nabu.sql.bz2
AWS_PROFILE=nabu-prod bin/aws/ecs_shell jobs -c "'mysqldump -u nabu -h \"\$NABU_DATABASE_HOSTNAME\" -p\"\$NABU_DATABASE_PASSWORD\" --single-transaction nabu' | bzip2 | base64" >| ../nabu.sql.bz2.b64
base64 -id < ../nabu.sql.bz2.b64 > ../nabu.sql.bz2
nabu_run bundle exec rake db:drop db:create
bzip2 -dc ../nabu.sql.bz2 | mysql -h 127.0.0.1 -u root nabu_devel
nabu_run bin/rails db:environment:set RAILS_ENV=development
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/concerns/has_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def build_basic_search
order:,
page: params[:page],
per_page: params[:per_page] || 10,
track: { user_id: current_user&.id, search_family: 'basic' },
track: params[:search] ? { user_id: current_user&.id, search_family: 'basic' } : nil,

misspellings: false
)
Expand Down
6 changes: 3 additions & 3 deletions bin/nabu_run
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ docker compose run \
--rm \
-v "$PWD":/rails \
-v "$PWD"/vendor/bundle:/bundler \
-v "$HOME"/.aws:/root/.aws \
-v "$HOME"/.aws:/home/rails/.aws \
-e SSH_AUTH_SOCK=/tmp/ssh.sock \
-e SENTRY_API_TOKEN="$SENTRY_API_TOKEN" \
-e ELASTICSEARCH_URL="$(grep ^ELASTICSEARCH_URL .env | sed 's/^.*=//')" \
-e AWS_PROFILE=nabu-prod \
-e AWS_PROFILE="$AWS_PROFILE" \
-v "$SSH_AUTH_SOCK:/tmp/ssh.sock" \
-v "$HOME"/.irb_history:/rails/.irb_history \
-v "$HOME"/.irb_history:/home/rails/.irb_history \
app \
"$@"

0 comments on commit da5ab35

Please sign in to comment.