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

Problems with Mapping Non-Standard Port #28

Open
plankconst opened this issue Mar 17, 2019 · 0 comments
Open

Problems with Mapping Non-Standard Port #28

plankconst opened this issue Mar 17, 2019 · 0 comments

Comments

@plankconst
Copy link

I setup my Cabot docker container on Ubuntu 18.04 and a public IP address and port mapping to port: 8080. It all works fine with the following setup:

docker-compose-caddy.yml:

version: "2.1"

services:
  caddy:
	image: abiosoft/caddy
	ports:
	  - '80:80'
	  - '443:443'
	depends_on:
	  - web
	volumes:
	  - ./.caddy:/root/.caddy
	  - ./conf/Caddyfile:/etc/Caddyfile

and docker-compose.yml:

version: "2.1"

services:
  web:
	extends:
	  file: docker-compose-base.yml
	  service: base
	command: sh -c "cabot migrate && gunicorn cabot.wsgi:application -b 0.0.0.0$
	ports:
	  - '8080:5000'
	depends_on:
	  - postgres
	  - rabbitmq
	restart: always
	...

However, when the server's Port 80 is used by another web application on my server and I want to map Cabot to port 8080 locally and then to 8080 publicly, it doesn't work.

In other words, the mapping would be:

Public Port 8080 --> Caddy Port 8080 --> Cabot 5000

I tried to change docker-compose-caddy.yml:

version: "2.1"

services:
  caddy:
	image: abiosoft/caddy
	ports:
	  - '8080:80'
	  - '443:443'
	depends_on:
	  - web
	volumes:
	  - ./.caddy:/root/.caddy
	  - ./conf/Caddyfile:/etc/Caddyfile

I get this error:

Recreating 7bca6949339e_docker-cabot_caddy_1 ... error
Recreating 7bca6949339e_docker-cabot_caddy_1 ...

ERROR: for 7bca6949339e_docker-cabot_caddy_1 Cannot start service caddy: driverCreating docker-cabot_worker_1 ... done
eb631a2673cff2ea0982a77fef50c90c713b4e8ae75761afcee080d40f33): Bind for 0.0.0.0:Creating docker-cabot_beat_1 ... done

ERROR: for caddy Cannot start service caddy: driver failed programming

Am I configuring my configuration files correctly?

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

1 participant