Commit Graph

665 Commits (375d9a2a3cf9c023ac6ac832d98f1b456fb9e2ce)

Author SHA1 Message Date
Nick Webster a57658d99c
Adding a new config flag to disable pictrs caching for thumbnails (#3897)
* add logic to prevent downloading remote pictrs images

* apply formatting

* Do not attempt a pictrs fetch if the remote image is also on a pictrs instance

* Do not attempt a pictrs fetch if the remote image is also on a pictrs instance and cache_federated_images is false

* Generalising the no caching option to handle all remote images

* rustfmt

* Return None if the URL is not an image

* Updating defaults.hjson

* fixing typo

* Fixing typo

* Skip cloning the Url unless we need to

* using a HEAD request for checking the content type, saving bandwidth/improving perf

* Removing early returns

* Switching back to GET requests for Content-Type because pictrs does not handle HEAD requests

* Simplifying logic and using metadata_image instead of url if we do not get a pictrs thumbnail

* Removing unused import

* Return None as a thumbnail if caching is disabled

* formatting

---------

Co-authored-by: Djones4822 <david.jones4822@gmail.com>
9 months ago
Ellie bd3f39973f
Add ARM64 Docker image support (#3810)
* Add ARM64 Docker image support

* Fix

* Fix Docker build

* Fix typo

* Use OpenSSL 3 and PostgreSQL Lib v15 in Docker builder

* Use simple comments in Dockerfile

* Add comment explaining Docker image cross build

* Move docker step above tests for testing

* Move docker build step back to normal position

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
9 months ago
asimons04 13a866aeb0
Update Dockerfile to run process as non-privileged user. (#3709) 10 months ago
Nina Blanson 40ff77eee2
Add workaround for #3102 until cross-compile work complete (#3472)
* Add workaround for #3102 until cross-compile work complete

* Minor cleanup

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
11 months ago
Dessalines 0c82f4e660 Version 0.18.1 11 months ago
Andrew Fields 1e99e8b9dc
Add Prometheus endpoint (#3456)
Add a server for serving Prometheus metrics. Include a configuration
block in the config file. Provide HTTP metrics on the API, along with
process-level metrics and DB pool metrics.
11 months ago
drumlinish 682ca55e0c
Fix quoting of max-file in docker-compose.yml (#3442) 11 months ago
Nutomic 8fbc630ce1
Remove networks from docker-compose.yml (#3356) 11 months ago
anonion 01dc1efe77
Fix lemmy UI environment variable (#3299) 11 months ago
Peter Dave Hello 2f3d60a63b
Leave no apk cache in Docker image (#3327) 11 months ago
Dessalines 63d3759c48 Version 0.18.0 12 months ago
Nutomic 434beadb58
Use Rust 1.70 for Docker and CI (#3265) 12 months ago
ShittyKopper 862ceefc56
docker-compose: Add init to UI (#3248)
* docker-compose: Add init to UI

Prevents waiting 10 seconds to shutdown

* docker-compose: Update to version 3.7
12 months ago
Dessalines d4f52b78b3
Trying to fix version again. (#3246) 12 months ago
Dessalines b214d3dc00
Adding current domain from settings to CORs. (#3231) 12 months ago
Nutomic b37c30ffae
Move cors default to source code (#3219) 12 months ago
Andrew DeLisa bfc0c0e7d3
fix: add CORS origin environment variable (#3191)
* fix: add CORS origin environment variable

* chore: formatting

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
12 months ago
Edgar Alvarado c32585b034
Docker yaml anchors and docker logs (#3027)
* Use anchor for duplicated compose properties

* Include docker log max

* Run prettier
12 months ago
Edgar Alvarado 932e65c16d
Fix ports used by docker (#3012)
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
12 months ago
Charles Hall 4e5798852f
make shebangs posix compliant (#2974)
Previously, these scripts wouldn't work on exotic systems such as NixOS.

```
fd '\.sh$' -t f --exec sed -i 's@#!/bin/bash@#!/usr/bin/env bash@'
```
1 year ago
Jason Watkins 491e197529
Add `lemmyexternalproxy` to `lemmy` so that it can talk to the internet (#2960)
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
1 year ago
Dessalines af03dcfeac
Fix dev setups. (#2944) 1 year ago
Justin Gauthier d439bdf8b4
Update to fix nginx proxy config for Docker Installs (#2908)
* Update to fix nginx proxy config

* Update docker-compose.yml - fix type

---------

Co-authored-by: Jax Gauthier <jax@gauthier.id>
1 year ago
Nutomic 1b4f995706
Remove jaeger, opentelemetry from docker-compose (#2894) 1 year ago
SleeplessOne1917 e856eda74d
Fix typo that caused error (#2861) 1 year ago
SleeplessOne1917 0379c9e4c1
Make volumes used in docker compose work when running on machines with SELinux enabled (#2853)
* Make volumes used in docker compose work when running on machines with SELinux enabled

* Switch lemmy-ui comments

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
1 year ago
Dessalines 1b5437cbe3
Addressing slow profile queries. #2777 (#2830)
* Addressing slow profile queries. #2777

* Addressing PR comments.
1 year ago
Dessalines 17527d0e7e
Reverting to older non-multi-arch dockerfile. Fixes #2832 (#2833) 1 year ago
6543 85ef507ac7
Use Dockerfile.multiarch as Dockerfile (#2818)
* use Dockerfile.multiarch and delete old Dockerfile

* Dockerfile.multiarch -> Dockerfile

* nit
1 year ago
SleeplessOne1917 f5511cfd25
Make path to local lemmy-ui use correct relative path (#2817) 1 year ago
6543 90c6dc2732
Use official rust image and clean up Dockerfiles (#2804)
* Add docker/Dockerfile.multiarch

* Update normal Dockerfile to be similar to multiarch one

* docker build run on x86 and arm64 now
manifest not needed, its handled by buildx plugin

* Rename Dockerfile.arm To Dockerfile.debian

* Emulate builder on arm target too

* fix misspell

* Improve Dockerfiles

* naming

* undo multiarchbuild settings as its blocked by a dependeny, see #2806

* Delete Dockerfile.debian
1 year ago
Nutomic 6f513793cb
Activitypub crate rewrite (#2782)
* update activitypub-federation crate to 0.4.0

* fixes

* apub compiles!

* everything compiling!

* almost done, federated follow failing

* some test fixes

* use release

* add code back in
1 year ago
Anon 6bc49bdd70
Add Custom Emojis Support (#2616)
* Add Custom Emojis

* Modify index
1 year ago
Nutomic 62663a9f2e
Implement separate mod activities for feature, lock post (#2716)
* Implement separate mod activities for feature, lock post

Also includes collection for featured posts. Later we also need
to do the same for Comment.distinguished

* some changes

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
1 year ago
Dessalines 47f4aa3550
Fixing slow joins to post_read, post_saved, and comment_saved . (#2738)
- Fixes #2445
1 year ago
Dessalines 993489a80f
Combine prod and dev docker setups using build-arg (#2739)
* Combine prod and dev docker setups using build-arg

- Fixes #2603

* Dont use cache for release build.
1 year ago
Nutomic 2891856b48
Fix docker federation setup (#2706) 1 year ago
Dessalines 5ae409d4e4 Version 0.17.1 1 year ago
Dessalines 53bc0311b1 Version 0.17.0 1 year ago
Dessalines a610211557
Fixing `.drone.yml` (#2677)
* Try to fix docker/drone plugin

* Trying to use one rust image.

* Fixing drone 1.

* Fixing drone 2.

* Add drone notify.

* Fixing drone 3.

* Fixing drone 4.

* Fix clippy.

* Remove uninlined format lint.

* Combine all cargo tasks

* Fixing drone 5.

* Fixing drone 6.

* Fixing drone 7.

* Fixing drone 8.

* Fixing drone 9.

* Fixing drone 10.

* Fixing drone 12.

* Fixing drone 13.

* Fixing drone 14.

* Fixing drone 15.

* Fixing drone 16.

* Fixing drone 17.

* Fixing drone 18.

* Fixing drone 19.

* Fixing drone 20.

* Fixing drone 21.

* Fixing drone 22.

* Fixing drone 23.

* Fixing drone 24.

* Fixing drone 25.

* Fixing drone 26.

* Fixing drone 27.

* Fixing drone 28.

* Fixing drone 29.

* Fixing drone 30.

* Fixing drone 31.

* Fixing drone 32.

* Fixing drone 33.

* Fixing drone 34.

* Fixing drone 35.

* Fixing drone 36.

* Fixing drone 37.

* Fixing drone 38.

* Fixing drone 39.

* Fixing drone 40.

* Fixing drone 41.

* Fixing drone 43.

* Fixing drone 44.

* Fixing drone 45.

* Last cleanup.

* Fixing drone 46.

* Separate ci steps (#2679)

* separate ci steps

* fix 1

* add comments

* dont add rustfmt explicitly

* Revert "dont add rustfmt explicitly"

This reverts commit 358ce3302a134b7ac88d90a854079356995e9725.

* dont use all features for tests

---------

Co-authored-by: Nutomic <me@nutomic.com>
1 year ago
Dessalines 70c549dad8
Speeding up comment-ltree migration, fixing index creation. Fixes #2664 (#2670)
* Speeding up comment-ltree migration, fixing index creation. Fixes #2664

* Adding some logging lines, fixing for missing posts.

* Adding more postgres config
1 year ago
Dessalines ac56504291
Upgrade to postgres 15. (#2659) 1 year ago
Dessalines 76e0ab934f
Fixing missing forms, incorrect user discussion_languages (#2580)
* Fixing missing forms, incorrect user discussion_languages

* Add discussion_language to CommunityResponse

* Adding discussion_languages to CommunityResponse

* Adding discussion_language logic to community.create
1 year ago
Dessalines 5d837780f5
Add diesel_async, get rid of blocking function (#2510)
* Moving settings to Database.

- Moves many settings into the database. Fixes #2285
- Adds a local_site and instance table. Fixes #2365 . Fixes #2368
- Separates SQL update an insert forms, to avoid runtime errors.
- Adds TypedBuilder to all the SQL forms, instead of default.

* Fix weird clippy issue.

* Removing extra lines.

* Some fixes from suggestions.

* Fixing apub tests.

* Using instance creation helper function.

* Move forms to their own line.

* Trying to fix local_site_data, still broken.

* Testing out async

* Testing out async 2

* Fixing federation tests.

* Trying to fix check features 1.

* Starting on adding diesel async. 1/4th done.

* Added async to views and schema.

* Adding some more async

* Compiling now.

* Added diesel async. Fixes #2465

* Running clippy --fix

* Trying to fix cargo test on drone.

* Trying new muslrust.

* Trying a custom dns

* Trying a custom dns 2

* Trying a custom dns 3

* Trying a custom dns 4

* Trying a custom dns 5

* Trying a custom dns 6

* Trying a custom dns 7

* Addressing PR comments.

* Adding check_apub to all verify functions.

* Reverting back drone.

* Fixing merge

* Fix docker images.

* Adding missing discussion_languages.

* Trying to fix federation tests.

* Fix site setup user creation.

* Fix clippy

* Fix clippy 2

* Test api faster

* Try to fix 1

* Try to fix 2

* What are these lines about

* Trying to fix 3

* Moving federation test back to top.

* Remove logging cat.
2 years ago
Nutomic 28eade6168
Fix invalid config in docker/prod (fixes #2520) (#2524) 2 years ago
Nutomic 3b0be52e67
Image improvements (#2513)
* Image improvements

* remove rate limits
2 years ago
Dessalines 235cc8b228
Moving settings to Database. (#2492)
* Moving settings to Database.

- Moves many settings into the database. Fixes #2285
- Adds a local_site and instance table. Fixes #2365 . Fixes #2368
- Separates SQL update an insert forms, to avoid runtime errors.
- Adds TypedBuilder to all the SQL forms, instead of default.

* Fix weird clippy issue.

* Removing extra lines.

* Some fixes from suggestions.

* Fixing apub tests.

* Using instance creation helper function.

* Move forms to their own line.

* Trying to fix local_site_data, still broken.

* Fixing federation tests.

* Trying to fix check features 1.

* Addressing PR comments.

* Adding check_apub to all verify functions.
2 years ago
Nutomic 276a8c2bd3
Enable lto, strip symbols via cargo.toml (#2512) 2 years ago
Dessalines 9ac13a0891
Fix docker dev build (#2509)
* Fixing docker dev build.

* Remove volume mount files.

* Fixing pictrs.

* Addressing PR comments.
2 years ago
sam365724 cb559178bd
More real-world prod config, separate lemmy config (#2487) 2 years ago