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

Binding to another port? #10

Closed
mattpackwood opened this issue Feb 6, 2020 · 8 comments
Closed

Binding to another port? #10

mattpackwood opened this issue Feb 6, 2020 · 8 comments
Labels
question Further information is requested

Comments

@mattpackwood
Copy link

is there a way to bind to another port (I have 8000 committed to a different application)?

@mattpackwood mattpackwood added the question Further information is requested label Feb 6, 2020
@caronc
Copy link
Owner

caronc commented Feb 6, 2020

Maybe this might work for you?

# Bind the internal port 8000 in the container to 9000 on your local machine
docker run --name apprise \
   -p 9000:8000 \
   -v /var/lib/apprise/config:/config \
   -d caronc/apprise:latest

Or are you installing the repository locally onto your machine and not using Docker at all? Here is the manage.py version:

# binding to a different port using the manage.py command
./manage.py runserver 0.0.0.0:9000

Edit: added manage.py example

@mattpackwood
Copy link
Author

I am running it in Docker, testing it now, many thanks. By the way, I look at the services you already support and the list is stunning!

@caronc
Copy link
Owner

caronc commented Feb 7, 2020

Thank you for your praise. If you can think of any notification services I don't support that you'd like to see, I'm always up for the challenge of trying to add it! 🙂 With respect to this ticket: by all means let me know if what I suggested doesn't work. Good luck!

Chris

@mattpackwood
Copy link
Author

It seems to be running but I am getting the following, let me dig into this later today.
pi@raspberrypi-greengrass:~ $ curl -X POST -d '{"urls": "mailto://user:[email protected]", "body":"test message"}' -H "Content-Type: application/json" http://localhost:9000/notify
curl: (7) Failed to connect to localhost port 9000: Connection refused

@caronc
Copy link
Owner

caronc commented Feb 9, 2020

Hi @mattpackwood that's strange because that's really all there is to it.

Is it possible there is a (software) firewall enabled on your Raspberry pi device that has port 9000 closed from the computer you're accessing it on?

If you actually ssh to the Raspberry pi, can you see if the port is listening at least correctly?

# See if you're set to LISTEN on port 9000
netstat -nat | egrep 9000

@mattpackwood
Copy link
Author

I have a docker-compose error I missed. I am going to have a go at rebuilding that from source and see where I end up.

@caronc
Copy link
Owner

caronc commented Feb 9, 2020

Okay :) good luck! I'll leave this ticket open all the same. Let me know how it all goes!

@mattpackwood
Copy link
Author

All sorted, I was having issues with docker-compose (I had to remove and re-install it).

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

No branches or pull requests

2 participants