curtisf / logger

Loggerbot version 3, the Discord bot serving nearly 24 million users.
https://logger.bot
GNU General Public License v3.0
374 stars 131 forks source link

FEAT - Docker Support + Docker Compose file #44

Open phil-flip opened 5 months ago

phil-flip commented 5 months ago

Here is my little implementation of Docker, inspired by https://github.com/curtisf/logger/issues/43 Since I changed some var names inside the code, it needs to be retested without Docker and see, if that still works. The Docker Compose file has been changed in a way to prevent the need for a docker specific .env file. The normal one can be used. The DB migration is a hotfix at best and should be redone. I wanted to prevent the use of the .dockerenv check as that might cause issues with other platforms like K8s. If a merge is undesirable that fine. But I also didn't want to keep it to my self. Let me know, if something doesn't work.

uchihaservice commented 5 months ago

Thanks, I was actually too lazy to do that :D

phil-flip commented 4 months ago

You're fine. It's just unfortunate, that the owner doesn't seem to merge PRs.

curtisf commented 4 months ago

Could you check out/review the docker-compose.yml in the branch named "selfhost"? That's likely going to be the one that gets distributed for selfhosting in the future.

phil-flip commented 4 months ago

Everyone has their own taste in Docker-Compose- and Dockerfiles. Personally I don't like it, because it has a lot of extra stuff in it, which is done automatically done by the Docker Compose-Plugin. On the other side, I seem to miss the setup for the DB. The health check is a nice touch tho. Your Dockerfile should definitely be cleaned up, cause it the current state it requires maintenance when a new file type or folder is added.