Commit Graph

31 Commits

Author SHA1 Message Date
Earlopain
0efe3defed
[Docker] Move rails pid file into tmpfs
After an unexpected exit you no longer need to remove it manually
2023-05-18 20:11:34 +02:00
Earlopain
e87d617c6f
[IQDB] Switch to new implementation 2023-04-24 14:46:26 +02:00
Earlopain
01b5f7dd14
[IQDB] Add integration for the new iqdb server
Use param v2=1 to use it, for now
2023-04-17 22:36:29 +02:00
Earlopain
148e7a74e3
[Docker] Bump redis and memcached 2023-04-13 20:46:05 +02:00
Earlopain
69fc143ec7
[Docker] Update iqdb to work with latest changes 2023-04-06 22:07:24 +02:00
Earlopain
9a97e02b20
[Tags] Import the external autocomplete service
This has been used in production for a while already, and now I
bothered to put it up here
2023-04-06 19:03:51 +02:00
Earlopain
6776704560
[DB] Upgrade to postgres 15
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.
2023-03-01 20:31:49 +01:00
Earlopain
fbf33f7d29
[DB] Remove test_parser extension
Usage has been removed in 5215876862 and pr #476
2023-02-26 16:41:02 +01:00
Earlopain
b75c35b4f2
[CI] Run tests 2023-02-25 15:14:48 +01:00
Earlopain
09be4cded9
[CI] Commit database.yml
Makes the test setup easier.
Also eases prod deploys with the two separate db pool sizes.
2023-02-25 14:41:07 +01:00
Earlopain
e6b374526b
[Docker] Make the rubocop cache work
On my slow machine a run took about 3m30s, with this change it's down to just 20s
2023-02-23 14:30:06 +01:00
Earlopain
057a67a168
[Docker] Miscellaneous improvements
* Install exact versions of redis/memcached/node
* Use multistage for js packages/ruby gems
* Replace shoreman with foreman
2022-12-13 15:50:37 +01:00
Earlopain
934c8e3b87
[Docker] Run daily maintenance
Remove whenever, it's not used in prod. Prod uses systemd timers.
This executes the daily task on container startup. My PC isn't going to
run when this would execute 99% of the time.
2022-12-09 18:16:53 +01:00
Earlopain
3294fabad5
Revert "[Docker] Remove node_modules volume"
This reverts commit 12cf54a8f3.
2022-12-06 23:13:51 +01:00
Earlopain
12cf54a8f3
[Docker] Remove node_modules volume
My intention was to share it between the test/main service (I think).
But since it's using the main one as a base anways it's already there.
This volume overlays on the one from newer builds, hiding js package changes.

public_packs_test is unused as well, remove.
2022-12-06 18:51:16 +01:00
Earlopain
79fd71e1f6
[Docker] Use healthcheck to wait for elasticsearch
Fixes #446
2022-11-09 18:18:30 +01:00
Earlopain
179a948cf2
[Docker] Add solargraph to the image, and a few more things
* 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)
2022-10-18 23:35:18 +02:00
Earlopain
24bceb2c67
[Docker] Add back iqdbs
Got lost in 5180d313ef, whoops
2022-04-22 17:59:47 +02:00
Earlopain
36df31eb74
[Docker] Wait until elasticsearch is up for tests 2022-03-28 17:51:53 +02:00
Earlopain
5180d313ef
[Docker] Add test service
This can simply be invoced with `docker-compose run tests`.
2022-03-28 16:18:07 +02:00
Earlopain
fb3190a3d9
[Docker] Add tty: true
This adds color to the different shoreman services, which were previously all white
2022-01-05 14:17:32 +01:00
Earlopain
05c704b83d
Merge pull request #353 from zwagoth/docker-iqdb
[Docker] Add iqdb/s to composer
2022-01-05 14:03:26 +01:00
Earlopain
82d7ff59e0
[Docker] Install gems and js packages into the image
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
2022-01-05 13:41:41 +01:00
Earlopain
65383ca5c1
[Docker] Another batch of review improvements
* Fix boolean value in compose file. I just removed the variable altogether,
the iqdb site already checked against iqdbs_server.present? anyways
* Add checksum check for iqbd download
* Fix newline in iqdb patchfile
2021-11-18 19:13:00 +01:00
Earlopain
71aab10d18
[Docker] Add iqdb/s to composer
Closes #315
2021-11-18 01:13:38 +01:00
Earlopain
ea321b118a
[Docker] A few small improvements
* Mark secrets as development only
* Parallelize test_parser build. I don't think there are enough files
to even hit the limit for me but good practice nontheless
* Rebuild postgres when test_parser changes. There has been no activity
in 6  years  and I don't expect this to change
2021-11-16 23:45:04 +01:00
Earlopain
74b3ab46c8
[Docker] Don't send build context 2021-11-16 22:08:23 +01:00
Earlopain
59e80b7a4d
[Docker] Implement recommendations from review
* Use alpine as the base image
* Parallelize bundle install

Using alpine as base make is feasable to use the provides vips library.
The version is actually newer than what was installed previously.

Other stuff I did:
* Set SECRET_TOKEN/SESSION_SECRET_KEY from docker-compose
* Mute elasticsearch startup logspam
* Execute image as root. This means mounted volume do'nt need to  be chowned
2021-11-16 21:32:40 +01:00
Earlopain
7f4114736d
[Setup] Save redis data to named volume
Prevents it from creating anonymous volumes over and over again
2021-11-14 23:51:41 +01:00
Earlopain
ce871e412c
[Setup] Improve docker setup
* 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
2021-11-14 14:12:51 +01:00
Earlopain
7c972ecf91
[Setup] Replace vagrant with docker 2021-11-14 03:31:26 +01:00