I haven’t been able to find an answer for this, so I’m hoping asking this here would be appropriate.

I’d like to try my hand at some development of Kbin but I don’t exactly know how to test a web application of this scale. Obviously, the roadblock for me is understanding how to develop and test features without having a dedicated domain name – as my understanding is that federated services heavily rely on the use of a domain name. This also would imply that the server has to be exposed to the internet, much like development of a email client.

But obviously I must be missing something here. Is there any recommended guidelines for setting up a development environment for Kbin? Ideally, a containerized approach via Docker or Podman would be ideal as I wouldn’t want to muck with my host system. Additionally, is it possible to use hostnames in order to simulate and test federation capabilities? Lastly, are there any thorough reads (blogs or forum posts) that go in depth with developing federated web applications and how the development process differs from standard webdev?

  • RoundSparrow@kbin.social
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    The bare install is pretty complicated. The docker install isn’t that bad following the directions if you are on Ubuntu 22.04. https://codeberg.org/Kbin/kbin-core/wiki/Admin-Docker-Guide

    I did it yesterday and it was a bit confusing which passwords to set, the directions have you edit files and kind of just says “change the passwords”… but they are all in docker-compose.override.yml file - if you start there it’s a little more clear.

    I couldn’t get it to start right on Ubuntu 22.04 and I tried deleting everything and starting over and kept running into the same problem. The database password wasn’t set.

    docker compose up

    without the “-d” at the end will show you output where I saw the password wasn’t right for the database. It was set the same in both files, not sure why it was wrong. I eventually issued a command directly to the database to set the password and that fixed the problem.

    docker compose exec -T db psql -U kbin -c "ALTER USER kbin WITH PASSWORD 'mypassword';"

    Then it all started up fine. I also figured out how to get the database on a different port than default because I normally use PosgreSQL 16 for development and kbin expects 13 in the install. So I wanted to tell kbin to use a different port. I can share that if anyone wants.

  • e569668@fedia.io
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    I believe you should be able to run it all locally without a hostname. The guides for doing so are here, depending on how you want to:
    https://codeberg.org/Kbin/kbin-core/wiki/Admin-Bare-Metal-Guide
    https://codeberg.org/Kbin/kbin-core/wiki/Admin-Docker-Guide

    Edit: I should clarify, I meant to test things without activitypub. As the other poster mentioned you would need a valid hostname and valid certs for federation testing. Though it might be possible to run multiple local kbins that trust each other, not sure there is going to be much information on that

    Someone just went through this themselves in the matrix kbin development channel so you could also potentially find help there if you’re having issues. One thing that came up during that is https://codeberg.org/Kbin/kbin-core/pulls/132 has a bunch of changes to those docs which might make it easier