Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
view the rest of the comments
Ok so I ran a clean install and confirmed that the database objects exist. So that's definitely the problem. Your database is munted. An interesting thing happened when I re-ran the playbook - I noticed it didn't rebuild the postgres container. Very suspicious! Let's try blowing it away completely and re-running your script:
docker stop lemmyname_postgres_1
docker rm lemmyname_postgres_1
now re run the ansible playbook and let's see if that works.
This alternative installer might be a way around this issue: https://github.com/ubergeek77/Lemmy-Easy-Deploy
well, that rules out your local system and ansible, at least. It seems like there's an inability for the docker containers to reach postgres definitely at the install and probably at runtime - can we check this?
first let's make sure the postgres container is on the network and has an address:
sudo docker exec -it <yourinstance>_postgres_1 /bin/sh
once you're on the container
ifconfig
which should return on the second line: inet addr:172.18.0.4 (or similar ipV4 address)
exit
to return to the host and let's test connecting from the host :nc -zv 172.18.0.4 5432
(use IP from the DB container)Ubuntu host should respond something like : Connection to 172.18.0.4 5432 port [tcp/postgresql] succeeded!
now let's try the containers
sudo docker exec -it <yourinstance>_lemmy-ui_1 /bin/sh
now from that container test connectivity to postgres:
nc -zv 172.18.0.4 5432
(use IP from the DB container)now the other
sudo docker exec -it <yourinstance>_lemmy_1 /bin/sh
on the docker containers the nc command should return something like
172.18.0.4 (172.18.0.4:5432) open
is that working?
weird. it's like it failed to install the postgres public schema properly. I am not at all familiar with ansible but I see you can set verbosity. Do you think it would be worth trying that?
According to link below you can preface your playbook command with ANSIBLE_DEBUG=true ANSIBLE_VERBOSITY=4
https://www.shellhacks.com/ansible-enable-debug-increase-verbosity/