jblance / mpp-solar

Python package to communicate to MPP Solar PIP-4048MS inverters (and similar)
MIT License
341 stars 147 forks source link

Docker: Run mpp-solar as a daemon? #499

Open nullinger opened 2 days ago

nullinger commented 2 days ago

Hi,

Is it possible to use the docker image to run mpp-solar as a daemon?

When used as decribed in the Wiki, it just seems to execute once and then terminates:

docker run --rm --name=mpp-solar jblance/mppsolar mpp-solar

According to the docker-compose.yaml, there seems to be a --daemon parameter but then it won’t start:

# docker run --rm --name=mpp-solar jblance/mppsolar mpp-solar --daemon

You are missing dependencies in order to be able to use the --daemon flag.
To install them, use that command:
    python -m pip install 'mppsolar[systemd]'

Am I missing something? Thank you in advance.

jblance commented 2 days ago

No that's a problem with the docker build. I'll try to fix it

On Wed, Jul 3, 2024, 09:12 nullinger @.***> wrote:

Hi,

Is it possible to use the docker image to run mpp-solar as a daemon?

When used as decribed in the Wiki https://github.com/jblance/mpp-solar/wiki/Installation#using-docker, it just seems to execute once and then terminates:

docker run --rm --name=mpp-solar jblance/mppsolar mpp-solar

According to the docker-compose.yaml https://github.com/jblance/mpp-solar/blob/master/docker/prod/docker-compose.yaml, there seems to be a --daemon parameter but then it won’t start:

docker run --rm --name=mpp-solar jblance/mppsolar mpp-solar --daemon

You are missing dependencies in order to be able to use the --daemon flag. To install them, use that command: python -m pip install 'mppsolar[systemd]'

Am I missing something? Thank you in advance.

— Reply to this email directly, view it on GitHub https://github.com/jblance/mpp-solar/issues/499, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJVKNXUSC6LIUBLU3DC6H3ZKMJSTAVCNFSM6AAAAABKIJZ2A2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGM4DOMJXGQ4DCNA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

jblance commented 15 hours ago

Ive add the required library to the latest docker build, but havent tested it yet give it a go and let me know how you get on

On Wed, 3 Jul 2024 at 18:18, John Blance @.***> wrote:

No that's a problem with the docker build. I'll try to fix it

On Wed, Jul 3, 2024, 09:12 nullinger @.***> wrote:

Hi,

Is it possible to use the docker image to run mpp-solar as a daemon?

When used as decribed in the Wiki https://github.com/jblance/mpp-solar/wiki/Installation#using-docker, it just seems to execute once and then terminates:

docker run --rm --name=mpp-solar jblance/mppsolar mpp-solar

According to the docker-compose.yaml https://github.com/jblance/mpp-solar/blob/master/docker/prod/docker-compose.yaml, there seems to be a --daemon parameter but then it won’t start:

docker run --rm --name=mpp-solar jblance/mppsolar mpp-solar --daemon

You are missing dependencies in order to be able to use the --daemon flag. To install them, use that command: python -m pip install 'mppsolar[systemd]'

Am I missing something? Thank you in advance.

— Reply to this email directly, view it on GitHub https://github.com/jblance/mpp-solar/issues/499, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJVKNXUSC6LIUBLU3DC6H3ZKMJSTAVCNFSM6AAAAABKIJZ2A2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGM4DOMJXGQ4DCNA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

nullinger commented 4 hours ago

Hi, I've pulled the latest image but in my tests the error is still the same.