This removes the need for all the ruby-lsp setup stuff.
ruby-lsp will try to install the debug gem which contains native code, add that to the gemfile so it doesn't cause trouble.
I'm probably going to remove the rubocop/test compose services at some point. With devcontainers you are just able to run the commands directly.
Also adds back something to .env.sample that I accidentally removed last commit.
The installation instructions to properly set up ruby-lsp are pretty convoluted at the moment,
I'm hoping that this will improve in the future. I openend https://github.com/Shopify/ruby-lsp/issues/1303 Let's see how that goes
It just works.
Requires a bit of a workaround for the .rubocop.yml env setup currently in use but thats alright.
The companion ruby-lsp-rails doesn't do much right now but I imagine that to become quite powerful in the future.
Run the following commands to import data into OpenSearch:
Post.document_store.create_index!
PostVersion.document_store.create_index!
Post.document_store.import
PostVersion.document_store.import
* Add opensearch client
* Add url param to force use opensearch
* Switch import method over to opensearch
* Index to opensearch as well
* Add option to gradually roll out os
* Index os with separate queue
* Move os post creation to job as well
* Exclusively use the OpenSearch client
* Stop enqueuing OsIndexUpdateJob
* Remove remaining elasticsearch code
Bump faraday since v2 is no longer blocked
Execute the following commands, before pulling:
docker-compose up -d
docker-compose exec postgres pg_dump danbooru2 -U danbooru > backup.sql
docker-compose down
docker volume rm e621ng_db_data
Execute the following commands, after pulling:
docker-compose up -d
docker-compose exec -T postgres psql -d e621_development -U e621 < backup.sql
This also changes the name of the database and role.
Now seems like a nice opportunity to do so.
Setup issues pop up occasionally, and sometimes it's fixable by
just redoing the build for some reason.
Also some general changes, heading titles/sizes,
removing outdated/useless information, formatting etc.
* Allow modifying .env without git complainging about changes to commit
* Require COMPOSE_PROFILE=solargraph for solargraph to be included in the image
* Set required vscode settings for solargraph to correctly work in docker
* Clean up .solargraph.yml. All these removed values are the default
* Disable autocomplete in the rails console
* Add a compose service to run rubocop
* Upddate rubocop config
Added some, removed some, ordered alphabetically.
Before: 844 files inspected, 6871 offenses detected, 6095 offenses autocorrectable
After: 844 files inspected, 8024 offenses detected, 7538 offenses autocorrectable
Most of the new offences are because of Style/StringLiterals (1312)
To see the changes persisted into the container run `docker-compose` build
`docker-compose down -v` no longer requires to reinstall gems/packages
It's also possible to have branches with different gemfiles, without having
to install between them constantly
This makes the environment config understand booleans. If something
ends with "?" it tries to interpret it as a boolean. A bunch of
existing configs where changed to reflect this change.
* Reduces the image size by using alpine and cleaning up after some things
* Simplify the initial setup instructions slightly
* Access via localhost:3000 instead of e621.local