#anyone can help me with the s6 services
1 messages · Page 1 of 1 (latest)
.
i need to run 3 things in the container. and the 2 i try to make services are php-fpm and lighttpd
if you want to build it, you need to comment line 92 in Docherfile
make COPY MMDVM.ini /MMDVMHost/MMDVM.ini to #COPY MMDVM.ini /MMDVMHost/MMDVM.ini
but then the container exit directly
but if you run the container with docker run --rm -it --user root local/amd64-addon-mmdvmhost:0.1.25 sh from ssh, you can interact with it
are you still stuck with this?
Yes. The two services just don't start on their own
ok so there are two ways to deal with s3 services
the old "classic" way and the newer way
the default home assistant addon base images support both as they use the newer version of s6
I think I'm using the old way
yeah looks like it
either works my addon repo uses a mixture
im just looking at your code now brb
Ok
this repo does something similar to what you are trying to do but it uses the newer s6 format
this uses the old style format:
https://github.com/bertybuttface/addons/tree/main/isponsorblocktv
I don't think you are supposed to override the CMD part of the Dockerfile that might be your problem, I think s6 is supposed to be the CMD
then all of your apps need to be services
not just 2 of the 3
does that sound like it might be the problem?
Not at all. Only problem could be log output
With mmdvmhost as CMD, all stdout and stderror gets send to the log site of the add-on. How to make sure, only this output is on the log page and not the output of the other services? And if default is no output of service to log, how to make it for one service?
worry about logging after you have all the services working?
right now you want 3 services to run and if they fall over be started back up
that means you need 3x s6 services
there isn't much way round that, you have to properly handle the log levels for each different service
The service's aren't the problem if it's just the docker CMD. But I need only the console output of one of the services on the add-on log page
I don't know exactly how to do it but I'd guess you can supress logs in the service startup file
Ok. Would you suggest the new format or to stick to the old format?
no idea, ive started writing everything new using the new format but ive not bothered going and changing any old stuff to the new format
I figure its best not to make new stuff old before its even released but equally I dont see the gain introducing bugs into old working stuff for the sake of it at this point
you have more control over the order things start up in if you use the new format
fair then yeah maybe stick to the way you know if its working for you
lol ok then learn the new way
fuck the old way for now
look at that matrix-ng one I sent you
Do you have some link's?
?
Do you have a simpler example then the matrix add-on with maybe only 2 services?
so the /etc/s6-overlay/s6-rc.d/user/contents.d file contains a blank file with the name of the service you want to start
not using the new method, only the other one I sent you that uses the old method
Ok, thanks
no worries sorry im still learning this stuff myself only worked this out a couple of months ago
will try and help where I can
I know what its like shouting into the void for help lol
good luck
Thx
now nothing starts...
i think my entire service problem was just a not working copy for the rootfs...
ok, now im at the point, that every service except the php service works...
it starts the php service, but then try to start it again and again and again, even its still running
ok, fixed
now all services work
thx @brazen vessel
hooray!! great work
I already pushed it to GitHub if you want to look
yeah that was probably your problem
that and line 103
glad its working now
im going to go ahead and close this thread, try and help others in devs_addons where you can, it can be very quiet and lonely trying to sort these kinda issues out as we both know, ill try and lurk where possible too