Closed XayOn closed 3 years ago
Also, DNS could be added directly to docker-compose. And OpenVPN if I finally manage to get pivpn working, too.
Oh, and obviously another way to generate the .env file, or just leave it to the user for now. In a near future, the .env file could be done with a web interface inside a docker, allowing web installs.
Basically:
step=web_env docker run xayon/bacchus && {
for step in first second third; do
bacchus_install=${step} docker-compose -pbacchus up
while read i; do if [ "$i" = bacchus_install_${step} ]; then break; fi; done < <(inotifywait -e create,open --format '%f' --quiet ./data/bacchus --monitor)
docker-compose -pbacchus stop
done
}
And when the .env file has been created by the web interface, just exit the container and it'll continue with the next installation steps.
Working on this on branch https://github.com/XayOn/bacchus/tree/feature/18
I'm migrating to wireguard too, this way I can safely remove all openvpn logic
I'm going to stop this for today. Right now, nothing is tested but it's almost complete. Only the .env generation system is missing.
I... forgot about nextcloud. Nextcloud has its own installation method now in docker-entrypoint.sh, its automatic and env variables based, and magical. I'd only add the apps installation, and probably the overwriteprotocol settings.
Overwriteprotocol is an envvar too. Only apps installation, and I'm willing to lose it for now.
I've recently asked at reddit ( https://www.reddit.com/r/selfhosted/comments/menn9u/best_way_to_automate_dockercompose_actions_and/ ) for ways to improve some of the issues here (mainly that starting/stopping docker compose from python is not exactly elegant).
I've got no response yet but I just figured that may be the best way to do it is by making bacchus work inside docker itself, and delegating in a separate component the docker-compose commands.
This way, the "core" bacchus would react to an environment variable and execute each a different configuration step based on an env var.
The shell script would look like:
This removes the need to have dockerpy, docker-compose classes and simplifies a lot the project (much less code).