Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker #1

Open
SeoFood opened this issue Feb 20, 2021 · 4 comments
Open

Docker #1

SeoFood opened this issue Feb 20, 2021 · 4 comments

Comments

@SeoFood
Copy link

SeoFood commented Feb 20, 2021

Great Idea to Just proxy it. Maybe you can make a small Dokerfile for people who don't use Go ;)

@Gerynant24
Copy link

Will this work for the Raspberry Pi? I've been hit with this problem and a proxy sounds a simple way forward but as a novice I'm not sure how to do it on the Pi.

@mgb
Copy link
Owner

mgb commented Feb 21, 2021

I had this running on a Pi. I don't use docker, but will accept other's docker files.

For Pi, if you are using ubuntu, you can apt install golang-go and get an older version that works perfectly fine. Or you can follow the Go Installation instructions and install it on pretty much anything. Check out this code, then follow the readme.

@jcbize
Copy link

jcbize commented Mar 12, 2021

This does work great, thanks @mgb. Here is a quick Dockerfile that could help folks get up and running quickly:

FROM golang:latest
EXPOSE 8043/tcp
RUN go install github.com/mgb/tesla-powerwall-local/cmd/tesla-powerwall-proxy@latest
COPY entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]

Along with the following entrypoint.sh:

$GOPATH/bin/tesla-powerwall-proxy --username "[email protected]" --password "yourpassword" --host "10.0.0.123" --listen "localhost:8043"

Build and run with:

docker build --tag="tesla-powerwall-local" .
docker run -d -p 127.0.0.1:8043:8043/tcp --network host --name Tesla-Powerwall-Local tesla-powerwall-local

Hope this helps.

@mnestor
Copy link

mnestor commented Aug 22, 2021

Here ya go: https://hub.docker.com/r/mnestor/teslapw-proxy
I kept it pulling the go source directly from your repo.

docker run -it \
     -e USERNAME="[email protected]" \
     -e PASSWORD="blah" \
     -e POWERWALL="powerwall" \
     mnestor/teslapw-proxy:latest

How I use it in docker swarm: https://github.com/mnestor/teslapw-proxy/blob/main/docker-swarm.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants