#anyone can help me with the s6 services

1 messages · Page 1 of 1 (latest)

spare kettle
#

.

#

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

brazen vessel
#

are you still stuck with this?

spare kettle
#

Yes. The two services just don't start on their own

brazen vessel
#

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

spare kettle
#

I think I'm using the old way

brazen vessel
#

yeah looks like it

#

either works my addon repo uses a mixture

#

im just looking at your code now brb

spare kettle
#

Ok

brazen vessel
#

this repo does something similar to what you are trying to do but it uses the newer s6 format

#

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?

spare kettle
#

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?

brazen vessel
#

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

spare kettle
#

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

brazen vessel
#

I don't know exactly how to do it but I'd guess you can supress logs in the service startup file

spare kettle
#

Ok. Would you suggest the new format or to stick to the old format?

brazen vessel
#

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

spare kettle
#

Ok

#

But the order for this add-on isn't important. Everything works alone too

brazen vessel
#

fair then yeah maybe stick to the way you know if its working for you

spare kettle
#

I don't know both ways XD

#

I know systemd XD

brazen vessel
#

lol ok then learn the new way

#

fuck the old way for now

#

look at that matrix-ng one I sent you

spare kettle
#

Do you have some link's?

brazen vessel
#

also look at the s6-supervise docs

#

the main gotcha is the blank files

spare kettle
#

?

spare kettle
#

Do you have a simpler example then the matrix add-on with maybe only 2 services?

brazen vessel
#

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

spare kettle
#

Ok, thanks

brazen vessel
#

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

spare kettle
#

Thx

spare kettle
#

now nothing starts...

#

i think my entire service problem was just a not working copy for the rootfs...

spare kettle
#

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

brazen vessel
#

hooray!! great work

spare kettle
brazen vessel
#

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