Commit Graph

23 Commits

Author SHA1 Message Date
evazion
189adc683f config: set default database connection settings.
Set sensible defaults for connecting to the database. By default, we try
to connect to the `danbooru2` database running on localhost as the
`danbooru` user. These are the defaults recommended by the install
guide.

If you need to change the database settings, set DATABASE_URL in
.env.local or on the command line:

   # .env.local
   DATABASE_URL=postgresql://danbooru:password@localhost/danbooru2

   # command line
   $ DATABASE_URL=postgresql://danbooru:password@localhost/danbooru2 bin/rails server

This eliminates the need to copy script/install/database.yml.templ to
config/database.yml during installation and during deployment. This is
so that Danbooru works out of the box without extra configuration. In
particular, this is so that we can run Danbooru in a Docker container
without having to set DATABASE_URL.
2021-03-23 02:29:45 -05:00
evazion
87fe3c63fb capistrano: fixup delayed jobs deployment. 2019-12-30 00:12:51 -06:00
evazion
3bcc503cf7 BURs: process bulk updates in dedicated job queue.
Add a dedicated queue for bulk update requests and process it using a
single worker. This prevents bulk updates from consuming all available
workers and preventing other job types from running.

This also effectively serializes bulk updates so that they're processed
one-at-a-time instead of in parallel. This will be slower overall but
may avoid some of the issues with indeterminate update order under
parallel updates.
2019-12-27 12:24:51 -06:00
evazion
309821bf73 rubocop: fix various style issues. 2019-12-22 21:23:37 -06:00
evazion
65e53b86b3 Drop support for /cache/tag.json.
Drop support for https://danbooru.donmai.us/cache/tags.json. This was a
nightly dump of the tags table that was originally added in #1012. It
was never documented and never really used except for by the DanbooruUp
extension.
2019-08-29 00:52:23 -05:00
evazion
fd639e3c81 capistrano: lower downtime window for delayed jobs. 2019-08-22 16:56:42 -05:00
evazion
39d70ae5cf capistrano: simplify unicorn:terminate task.
Use the builtin task provided by capistrano3-unicorn. Ours failed with
invalid pidfile errors in some cases.
2019-08-15 12:51:51 -05:00
evazion
5acc75d21b capistrano: fix sleep calls.
Minor optimization for `cap production deploy --dry-run`. Sleep on the
server instead of in the client.
2019-08-12 18:22:44 -05:00
evazion
072885bbf8 delayed jobs: run dj workers under systemd (fix #4108). 2019-08-10 02:57:32 -05:00
evazion
bfffb57c13 capistrano: clean up unicorn:terminate task.
Do a SIGQUIT (graceful shutdown, allow workers to finish current
request) before doing a SIGTERM (immediate shutdown).
2019-08-07 22:36:12 -05:00
evazion
c225d54de1 capistrano: add deploy:rolling task (fix #4123). 2019-08-07 22:11:07 -05:00
Albert Yi
897d3d3a99 add production2 env for testing new servers 2018-10-03 11:23:26 -07:00
r888888888
c2029b62b5 delayedjob fixes 2017-10-10 15:49:34 -07:00
r888888888
c23ea7f7b2 dont upload cropped thumbnails 2017-10-10 13:00:09 -07:00
Albert Yi
9a75a05c25 move newrelic + deploytags gem to production env, rename cap tasks to .rake 2016-12-06 15:47:21 -08:00
r888888888
8abd94b02d add kill step to unicorn cap 2016-08-02 22:14:50 -07:00
r888888888
7cf2dbc15b terminate unicorn procs on deploy 2016-08-02 22:12:14 -07:00
r888888888
d90fd6c46a force unicorn to terminate before restarting 2016-08-02 21:08:41 -07:00
r888888888
dd36da1a45 install script fixes 2015-10-02 14:51:02 -07:00
r888888888
a509658d5b fixes to install scripts 2015-10-02 13:36:40 -07:00
r888888888
6234802157 set rails_env for delayed_job 2015-08-24 15:09:00 -07:00
r888888888
59c7460456 fix cap tasks 2015-08-24 14:11:34 -07:00
r888888888
ba04068bfc move cap tasks into separate files 2015-08-19 16:51:15 -07:00