ubergeek77 / Lemmy-Easy-Deploy

Deploy Lemmy the easy way!
MIT License
133 stars 14 forks source link

Unable to redeploy due to missing hostname.env #40

Closed JeffCraig closed 1 year ago

JeffCraig commented 1 year ago

I needed to make custom changes to via ./custom/customPostgresql.conf , but when I run ./deploy.sh -f I receive an error:

ERROR: You did not set your hostname in hostname.env! Do it like this:
LEMMY_HOSTNAME=example.com

I've tried creating this file in the Lemmy-Easy-Deploy and Lemmy-Easy-Deploy/Live directories, but the error persists.

admin@localhost:~/Lemmy-Easy-Deploy$ sudo ./deploy.sh -f

WARNING: Force deploying; this will regenerate configs and deploy again even if there were no updates
Passwords will NOT be re-generated

========================================
Lemmy-Easy-Deploy by ubergeek77 (v1.2.7)
========================================

Detected runtime: docker (Docker version 24.0.4, build 3713ee1)
Detected compose: docker compose (Docker Compose version v2.19.1)
   Runtime state: OK

ERROR: You did not set your hostname in hostname.env! Do it like this:
LEMMY_HOSTNAME=example.com

There's also discrepancies in documentation about the file name to use for customPostgresql.conf

On https://github.com/ubergeek77/Lemmy-Easy-Deploy it says ./custom/customPostgresql.conf But on https://github.com/ubergeek77/Lemmy-Easy-Deploy/blob/main/ADVANCED_CONFIGURATION.md it says ./custom/customPostgres.env

ubergeek77 commented 1 year ago

Ok, the error message you saw is just wrong and it's been like that this entire time apparently. Whoops. You'll need to edit config.env like in the readme. If you're seeing this message, you already have a config.env, so all you have to do is edit it and set a hostname. I'll go and get that message fixed though.

For the postgres stuff, no discrepancies - one of them sets environment variables, and the other passes a custom .conf file into the container šŸ‘

JeffCraig commented 1 year ago

Thanks for the quick reply. I just found this out right as you responded and changing in config.env did resolve the issue. I'm not sure how I missed that hostname value or how the initial deployment worked without it :D

ubergeek77 commented 1 year ago

Thanks for pointing it out! I went and re-tagged 1.2.7 with that silently fixed.

For your postgres stuff, remember that the customPostgresql.conf file will be mounted inside the container as postgres.conf, and the customPostgresql.env file defines a set of environment variables to pass onto the container. Chances are, you'll want the .conf one!