Commit Graph

73 Commits

Author SHA1 Message Date
evazion
f359d44763 metadata: fix failure to get exif data for compressed SWF files.
Fix Exiftool not being able to get the metadata for compressed SWF
files. Exiftool requires Compress::Zlib as an optional dependency to
decompress compressed SWF files, but it wasn't in the Docker image.

Archive::Zip is required for Zip files and Digest::MD5 for certain other
metadata (see "DEPENDENCIES" in exiftool README).
2021-09-15 18:39:42 -05:00
evazion
3d660953d4 Add MediaMetadata model.
Add a model for storing image and video metadata for uploaded files.

Metadata is extracted using ExifTool. You will need to install ExifTool
after this commit. ExifTool 12.22 is the minimum required version
because we use the `--binary` option, which was added in this release.

The MediaMetadata model is separate from the MediaAsset model because
some files contain tons of metadata, and most of it is non-essential.
The MediaAsset model represents an uploaded file and contains essential
metadata, like the file's size and type, while the MediaMetadata model
represents all the other non-essential metadata associated with a file.

Metadata is stored as a JSON column in the database.

ExifTool returns all the file's metadata, not just the EXIF metadata.
EXIF is one of several types of image metadata, hence why we call
it MediaMetadata instead of EXIFMetadata.
2021-09-08 05:00:54 -05:00
evazion
1a8c70f5ff config: auto generate secret key if none given.
Automatically generate a random secret key for `Danbooru.config.secret_key_base`
if no key is specified.

This so that you can run Danbooru in a Docker container with zero
configuration.

This removes support for the ~/.danbooru/secret_token file and the
SECRET_TOKEN environment variable. If you used either one of these, you
must copy the value either to DANBOORU_SECRET_KEY_BASE in .env.local, or to
`secret_key_base` in config/danbooru_local_config.rb.

   # .env.local
   DANBOORU_SECRET_KEY_BASE=<value>

   # config/danbooru_local_config.rb
   def secret_key_base
      # <value>
   end
2021-03-23 03:11:41 -05:00
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
Vladimir-A
0f44d8b974 Change: regular expressions.
Add [^ -] to exclude duplicate.
Example:
PostgreSQL 11.9 (Debian 11.9-0+deb10u1)
2020-12-15 05:15:57 +03:00
Vladimir-A
cf70a651f0 Add: apt-get -y install gcc g++
gcc, g ++ is required to building
2020-12-15 05:01:25 +03:00
evazion
209350de5b scripts: remove unused danbooru-specific config.
Danbooru-specific configuration now lives in https://github.com/danbooru/danbooru-ansible.
2020-06-21 18:56:42 -05:00
evazion
af4891bf4c Upgrade to ruby 2.7. 2020-02-16 18:48:41 -06:00
evazion
0a5d8f57d5 ruby: bump ruby version to 2.6.5. 2019-12-05 22:32:45 -06:00
evazion
5d1a1cc87e Change github repo url to https://github.com/danbooru/danbooru.
The danbooru repo was moved to https://github.com/danbooru.
2019-12-02 17:33:40 -06:00
can
791a8c3da0 necessary package to build pgsql extension 2019-11-22 04:12:39 +03:00
evazion
13f26c81d8 Remove unused files. 2019-11-15 23:59:56 -06: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
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
nothink
72ceb484ce Update INSTALL.debian, for Debian 9(stretch) 2019-08-05 23:29:12 +09:00
Albert Yi
27072d695d add lcms2 dependency in install 2018-10-03 13:52:04 -07:00
Albert Yi
897d3d3a99 add production2 env for testing new servers 2018-10-03 11:23:26 -07:00
Albert Yi
34d9cc6d57 fixes #3648 2018-04-17 16:28:17 -07:00
evazion
74d46708c7 INSTALL.debian: bump ruby version to 2.5.1 (4ff5af626). 2018-03-30 18:58:18 -05:00
evazion
dc9b7e5bda Fix #3582: Switch from ImageMagick to libvips 2018-03-28 17:15:57 -05:00
evazion
44c604521e Fix #3572: Install script installs wrong ruby version. 2018-03-20 02:21:43 -05:00
Jason Forbes
16f9c9bc45 Fixing dependencies for newer releases of Debian (>=9.0) 2017-10-07 20:23:57 -04:00
Albert Yi
ced7a34afa additional fixes for install script 2016-10-17 16:15:12 -07:00
Albert Yi
3479ad89c6 readd postgresql-contrib package; add conditional check for postgresql version before compiling test_parser extension #2707 2016-10-11 17:46:37 -07:00
Albert Yi
bf4397cbe4 update install script for ruby 2.3.1 2016-10-10 16:46:59 -07:00
Albert Yi
46beb247ea update ruby version to 2.3.1 2016-10-10 16:45:37 -07:00
Albert Yi
e496ac1ed6 adjustments to install script 2016-10-10 16:29:19 -07:00
Type-kun
cc7d76b168 Fix ownership of secret files in install script (mentioned in #2705, #2515) 2016-10-07 17:03:06 +05:00
Albert Yi
d776f00003 create default preview + sample directories in install script 2016-10-06 11:20:42 -07:00
r888888888
11244280d8 clearer instructions on INSTALL script 2016-09-12 13:49:57 -07:00
oktskzyk
a9d7f5284d Fix install script permission deny when copying config files 2015-10-11 03:53:39 +08:00
r888888888
dd36da1a45 install script fixes 2015-10-02 14:51:02 -07:00
r888888888
781fd8fda2 update install script 2015-10-02 13:39:59 -07:00
r888888888
a509658d5b fixes to install scripts 2015-10-02 13:36:40 -07:00
r888888888
cda3408768 fix install script 2015-05-04 19:48:18 -07:00
r888888888
447597b665 add Dockerfile support 2015-01-22 15:18:52 -08:00
r888888888
b094ff48e9 fix 2014-06-22 21:03:09 -07:00
r888888888
3ed3febe06 update install scripts 2014-06-22 20:25:32 -07:00
r888888888
16c1a45066 fixes #2148 2014-05-09 17:25:38 -07:00
dobacco
00908a7ace fix install script to work with unicorn 2013-04-17 21:45:29 -07:00
albert
dc722788be update install script 2013-01-17 10:56:55 -05:00
albert
858a8ed72a remove keymaster dependency 2012-09-19 16:53:36 -04:00
albert
bbe05ae3fa updates to install script 2012-09-05 15:47:37 -04:00
albert
8b2ac0cb70 changes 2012-05-31 15:56:50 -04:00
albert
672e35c7fd updated install script 2012-04-19 15:14:53 -04:00
albert
ee1329235d fix to install script, add ordering to dmails 2011-12-07 16:58:52 -05:00
albert
47abe4eacd fixed stylign for flash previews 2011-10-28 16:22:33 -04:00
albert
018c8bceea install script fixes 2011-10-22 22:30:32 -04:00
albert
45d3500c91 install script fixes 2011-10-22 22:06:40 -04:00
albert
5e809a57a7 updated install script 2011-10-22 21:44:08 -04:00