Commit Graph
25 Commits
Author SHA1 Message Date
evazion 2c6567b5d2 Remove uses of the read replica database.
https://danbooru.donmai.us/forum_topics/9127?page=283#forum_post_160508

There was a recent outage that was caused by the read replica
(yukinoshita.donmai.us) being temporarily unavailable. The pg driver in
rails got hardstuck trying to connect to the replica, which brought down
the whole site. The app servers stopped responding and could only be
brought down with SIGKILL. Even try to boot the rails console didn't
work.

We only really used this to calculate tag counts inside Post.fast_count,
which wasn't really beneficial since the read replica is slower than the
main database.
2019-10-22 12:15:46 -05:00
evazion 059e061b15 tests: fixup comment vote, post controller tests.
Use git clean to delete stale files from an earlier checkout. These
files interfered with various things (specifically, a comment vote test
failed because there was an old comment_votes/create.json.erb template
hanging around that changed the behavior of the POST /comment_votes endpoint).
2019-09-09 15:06:24 -05:00
evazion dfe2b831a3 cache: replace memcache with redis.
Drop memcache. Use redis for all caching instead.
2019-08-22 23:15:34 -05:00
evazion 4833b8a63c Fix the circleci build. 2019-08-14 16:42:37 -05:00
evazion e29e5fe984 Fix #4131: Upgrade to Ruby 2.6.
Upgrade procedure:

    $ echo 2.6.3 > .ruby-version

    # upgrade ruby-build to know about the latest ruby versions.
    # see also: github.com/rkh/rbenv-update
    $ cd ~/.rbenv/plugins/ruby-build && git pull

    # install the version of ruby specified in .ruby-version.
    # see also: github.com/capistrano/rbenv/issues/83
    $ rbenv install --skip-existing

    # update the shell to use the latest version of ruby by default.
    $ rbenv global 2.6.3

    # update rubygems and bundler
    $ gem update --system

    # update the lockfile to use the latest version of bundler
    $ bundle update --bundler
2019-08-14 12:25:50 -05:00
evazion 853becbcfc circleci: try to fix the build. 2019-08-08 01:07:57 -05:00
nothink 72ceb484ce Update INSTALL.debian, for Debian 9(stretch) 2019-08-05 23:29:12 +09:00
Albert Yi d10b898dd6 add dependency for redis image on docker compose config 2019-01-24 13:25:40 -08:00
Albert Yi ad3ab4c9a3 add redis image to docker compose config 2019-01-24 13:24:43 -08:00
Albert Yi 897d3d3a99 add production2 env for testing new servers 2018-10-03 11:23:26 -07:00
Albert Yi 762dc3da24 Refactor sources 2018-08-24 12:10:51 -07:00
Albert Yi b596ecb868 update docker file 2018-08-01 14:23:41 -07:00
Albert Yi 7f895bd91f fix specs 2018-07-02 15:19:19 -07:00
Albert Yi f4d5932a66 update dockerfiles 2018-06-25 17:29:01 -07:00
Albert Yi 2d8fcf820e udpates to ci dockerfiles 2018-06-25 16:06:39 -07:00
Albert Yi 9c148fada4 update ci dockerfile to build and install vips 2018-06-25 15:39:23 -07:00
Albert Yi 660693ccef include apt-get clean in dockerfile 2018-06-05 16:13:26 -07:00
Albert Yi f938718677 wip 2018-05-11 16:26:24 -07:00
Albert Yi c6ae060d28 include circle ci env vars in docker env 2018-05-11 13:16:36 -07:00
Albert Yi 6839249e9d add logic for persisting pixiv sessions in tests 2018-05-10 13:59:57 -07:00
Albert Yi 780d899c85 move passwords to env 2018-05-09 15:15:33 -07:00
Albert Yi c144159dd9 fix tests 2018-05-09 14:36:03 -07:00
Albert Yi 59dde72924 fix pixiv tests, install ffmpeg 2018-05-09 14:11:34 -07:00
Albert Yi 0f2e6a9a1b fix tests 2018-05-09 12:45:37 -07:00
Albert Yi 79ea6f7e6c Add Docker and Travis config files to enable CI tests
Also fixes some Rails 6.0 deprecation warnings
2018-05-09 09:56:38 -07:00