Commit graph

666 commits

Author SHA1 Message Date
SleeplessOne1917 a866b3424d
Make local federated instances use comnpose file for build (#3968)
* Make local federated instances use comnpose file for build

* Remove commented out part of script
2023-09-20 09:14:51 -04:00
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>
2023-08-31 10:36:39 -04:00
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>
2023-08-31 09:02:59 -04:00
asimons04 13a866aeb0
Update Dockerfile to run process as non-privileged user. (#3709) 2023-07-24 09:51:51 -04:00
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>
2023-07-13 13:02:08 +02:00
Dessalines 0c82f4e660 Version 0.18.1 2023-07-07 09:24:49 -04:00
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.
2023-07-05 13:25:19 +02:00
drumlinish 682ca55e0c
Fix quoting of max-file in docker-compose.yml (#3442) 2023-07-03 10:59:07 +02:00
Nutomic 8fbc630ce1
Remove networks from docker-compose.yml (#3356) 2023-06-26 12:10:38 -04:00
anonion 01dc1efe77
Fix lemmy UI environment variable (#3299) 2023-06-26 06:07:22 -04:00
Peter Dave Hello 2f3d60a63b
Leave no apk cache in Docker image (#3327) 2023-06-26 11:59:02 +02:00
Dessalines 63d3759c48 Version 0.18.0 2023-06-23 08:41:20 -04:00
Nutomic 434beadb58
Use Rust 1.70 for Docker and CI (#3265) 2023-06-22 07:46:07 -04:00
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
2023-06-22 10:22:15 +02:00
Dessalines d4f52b78b3
Trying to fix version again. (#3246) 2023-06-21 21:46:32 +02:00
Dessalines b214d3dc00
Adding current domain from settings to CORs. (#3231) 2023-06-20 20:29:48 -04:00
Nutomic b37c30ffae
Move cors default to source code (#3219) 2023-06-20 11:19:03 -04:00
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>
2023-06-20 08:29:38 -04:00
Edgar Alvarado c32585b034
Docker yaml anchors and docker logs (#3027)
* Use anchor for duplicated compose properties

* Include docker log max

* Run prettier
2023-06-13 08:37:06 -04:00
Edgar Alvarado 932e65c16d
Fix ports used by docker (#3012)
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-06-12 18:38:27 -04:00
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@'
```
2023-06-08 15:38:26 -04:00
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>
2023-06-08 08:30:16 -04:00
Dessalines af03dcfeac
Fix dev setups. (#2944) 2023-06-06 22:22:21 -04:00
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>
2023-06-05 12:43:31 +02:00
Nutomic 1b4f995706
Remove jaeger, opentelemetry from docker-compose (#2894) 2023-06-04 22:16:49 +02:00
SleeplessOne1917 e856eda74d
Fix typo that caused error (#2861) 2023-05-14 14:02:05 -04:00
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>
2023-05-11 20:15:12 -04:00
Dessalines 1b5437cbe3
Addressing slow profile queries. #2777 (#2830)
* Addressing slow profile queries. #2777

* Addressing PR comments.
2023-04-25 19:28:06 -04:00
Dessalines 17527d0e7e
Reverting to older non-multi-arch dockerfile. Fixes #2832 (#2833) 2023-04-25 22:40:58 +02:00
6543 85ef507ac7
Use Dockerfile.multiarch as Dockerfile (#2818)
* use Dockerfile.multiarch and delete old Dockerfile

* Dockerfile.multiarch -> Dockerfile

* nit
2023-04-18 22:21:31 +02:00
SleeplessOne1917 f5511cfd25
Make path to local lemmy-ui use correct relative path (#2817) 2023-04-17 13:38:59 -04:00
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
2023-04-16 12:56:12 -04:00
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
2023-03-21 16:03:05 +01:00
Anon 6bc49bdd70
Add Custom Emojis Support (#2616)
* Add Custom Emojis

* Modify index
2023-03-20 17:32:31 -04:00
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>
2023-02-18 09:50:28 -05:00
Dessalines 47f4aa3550
Fixing slow joins to post_read, post_saved, and comment_saved . (#2738)
- Fixes #2445
2023-02-18 09:35:35 -05:00
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.
2023-02-17 15:29:45 +09:00
Nutomic 2891856b48
Fix docker federation setup (#2706) 2023-02-05 12:30:10 -05:00
Dessalines 5ae409d4e4 Version 0.17.1 2023-02-03 09:36:18 -05:00
Dessalines 53bc0311b1 Version 0.17.0 2023-01-31 08:30:54 -05:00
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>
2023-01-30 14:17:24 -05:00
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
2023-01-23 09:59:25 -05:00
Dessalines ac56504291
Upgrade to postgres 15. (#2659) 2023-01-20 18:15:07 +01:00
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
2022-12-19 11:40:22 +00:00
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.
2022-11-09 10:05:00 +00:00
Nutomic 28eade6168
Fix invalid config in docker/prod (fixes #2520) (#2524) 2022-11-02 18:50:09 +00:00
Nutomic 3b0be52e67
Image improvements (#2513)
* Image improvements

* remove rate limits
2022-10-28 14:34:40 +00:00
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.
2022-10-27 09:24:07 +00:00
Nutomic 276a8c2bd3
Enable lto, strip symbols via cargo.toml (#2512) 2022-10-25 15:10:07 +00:00
Dessalines 9ac13a0891
Fix docker dev build (#2509)
* Fixing docker dev build.

* Remove volume mount files.

* Fixing pictrs.

* Addressing PR comments.
2022-10-21 15:13:24 +00:00