I ran into this at one point as well. You can unset the private instance flag manually in the database and restart to get up and running again.
First connect to psql:
docker-compose exec postgres psql -U lemmy
Then run an update to unset the flag:
lemmy=# update local_site set private_instance = false;
Which should update 1 row (only 1 row in that table if you're on a typical install)