ubergeek77 / Lemmy-Easy-Deploy

Deploy Lemmy the easy way!
MIT License
135 stars 16 forks source link

Support custom environment variables #9

Closed LRMAN0989 closed 1 year ago

LRMAN0989 commented 1 year ago

I set up my instance and couldn't figure out why it wasn't federating; eventually realized the docker-compose.yml.template had the wrong environment variable. After changing it, my instance now federates

I would make a pull request but I know nothing about git

ubergeek77 commented 1 year ago

I don't think that's related to your federation issues. That environment variable was pulled directly from Lemmy's example deployment:

https://github.com/LemmyNet/lemmy/blob/1386039eceb5f49bcb3e060462f923c0d56b8721/docker/prod/docker-compose.yml#L54

Can you tell me where you saw LEMMY_UI_HTTPS used?

LRMAN0989 commented 1 year ago

I found it on the Lemmy-UI readme https://github.com/LemmyNet/lemmy-ui/blob/main/README.md

I changed the setting and instantly started federation, so not sure what else I could have done that

ubergeek77 commented 1 year ago

It looks like they've kept forgetting to update this since the 0.17.0 release.

But just so you know, this was completely unrelated to your federation issues, for two reasons:.

https://github.com/LemmyNet/lemmy-ui/blob/0.17.4/src/shared/env.ts

Anecdotally, I use this deployment script myself, and my federation works fine.

I should still change it, because their deployment is actually wrong, so thanks for pointing that out! But, the variable doesn't really do much.

I think your federation issues were either fixed by a reboot, or by your server simply trying again. Especially if you're trying to federate with Lemmy.ml or lemmy.world. Their federation queues are extremely behind with all the new users.

This one isn't super critical, so I'll leave this issue open until I sneak in a fix in an update :)

LRMAN0989 commented 1 year ago

Fair enough! I think it must default to false though, the only reason I went looking for it is because I saw in the logs a line saying "ishttps: false" or something like that, and after changing the variable it shows true now

The instance was working fine besides federation so not sure what the setting does break if set wrong then

ubergeek77 commented 1 year ago

Haven't really gotten to this yet, sorry, I was working on a ton of other things.

This is a feature I want to add, so I'm hijacking this issue to track it. In the future I'll allow the user to add custom environment variables.

The one you were trying to use is technically only present for debugging purposes by the official Lemmy team, so I no longer explicitly set it, but you can still edit your docker-compose.yml between updates in the meantime if you really do need it.

ubergeek77 commented 1 year ago

Hello @LRMAN0989 !

While I have removed the variable you have been using from the default docker-compose.yml, I have added a feature to Lemmy-Easy-Deploy that allows you to specify custom environment variables for any service. Please see the release notes for how to use this feature:

https://github.com/ubergeek77/Lemmy-Easy-Deploy/releases/tag/1.2.3

Let me know if you have any questions!