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

chore: remove docker binding to port 80 #72

Closed
wants to merge 3 commits into from

Conversation

zeke
Copy link
Member

@zeke zeke commented Aug 12, 2018

I was able to get docker-compose up to work by removing this line.

@damianopetrungaro is this line needed? I don't know how the site is currently deployed.

Resolves #71

@damianopetrungaro
Copy link
Member

@zeke what error message did you have?

The docker-compose file you see is only used for development purposes, so we can change it without BC in our production environment.

The line you deleted is used to bind the internal port 4000 to the 80 on your machine.
I just re-executed a docker-compose up on my laptop and it works fine.

Let me know 😄

@zeke
Copy link
Member Author

zeke commented Aug 12, 2018

what error message did you have?

See #71

Bind for 0.0.0.0:80 failed: port is already allocated

I don't recall having done any custom port configuration on my machine before.

@zeke zeke changed the title Chore remove docker binding to port 80 chore: remove docker binding to port 80 Aug 12, 2018
@damianopetrungaro
Copy link
Member

damianopetrungaro commented Aug 12, 2018

@zeke Run sudo lsof -n -i :80 | grep LISTEN -C 3 and you'll see who is using the port 80.

I don't recall having done any custom port configuration on my machine before.

@zeke
Copy link
Member Author

zeke commented Aug 12, 2018

$ sudo lsof -n -i :80 | grep LISTEN -C 3
Password:
COMMAND     PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
com.docke 77826    z   20u  IPv4 0xa62213e2e2438a2b      0t0  TCP *:http (LISTEN)
Google    84009    z  114u  IPv6 0xa62213e2c034399b      0t0  TCP [2600:1700:e7c1:570:79e1:7b4b:bff6:122]:59573->[2607:f8b0:4002:813::200e]:http (CLOSE_WAIT)
Google    84009    z  118u  IPv6 0xa62213e2cce3099b      0t0  TCP [2600:1700:e7c1:570:79e1:7b4b:bff6:122]:59595->[2607:f8b0:401c:2e::8]:http (CLOSED)
Google    84009    z  128u  IPv6 0xa62213e2cce3141b      0t0  TCP [2600:1700:e7c1:570:79e1:7b4b:bff6:122]:59596->[2607:f8b0:401c:2e::8]:http (CLOSE_WAIT)

@damianopetrungaro
Copy link
Member

The process with ID 77826 is listening to that door.

It's a docker process, try restarting docker so you'll kill all the processes and no one will be listening to that door and you'll be sure you will be able to use it.


btw changing the port you are binding from the container to your machine, you should be able to see the website up and running 😄

Using this:

- 8080:4000

then docker-compose up, finally (after that jenkyll will generate the website, will take a while) visit localhost:8080 ;)

Let me know if you have any other doubt 😄

@zeke zeke mentioned this pull request Sep 16, 2018
@damianopetrungaro damianopetrungaro deleted the chore--remove-docker-binding-to-port-80 branch January 2, 2019 15:47
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

Successfully merging this pull request may close these issues.

2 participants