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

Pass different port to adminer #81

Closed
tillias opened this issue Oct 11, 2020 · 2 comments
Closed

Pass different port to adminer #81

tillias opened this issue Oct 11, 2020 · 2 comments
Labels

Comments

@tillias
Copy link

tillias commented Oct 11, 2020

Hello folks,

Thanks for a very nice product. Is there any possibility to define custom port for adminer? I'm using docker compose and internal port 8080 is already bound:

...microservice-catalog>docker-compose up
Creating network "microservice-catalog_default" with the default driver
Creating microservice-catalog_adminer_1 ...
Creating microservice-catalog_microcatalog_1 ...
Creating microservice-catalog_microcatalog_1 ... error
WARNING: Host is already in use by another container
Creating microservice-catalog_adminer_1      ... done
ERROR: for microservice-catalog_microcatalog_1  Cannot start service microcatalog: driver failed programming external connectivity on endpoint microservice-catalog_microcatalog_1 (ef2bdfa5426b8bb7f44Creating microservice-catalog_db_1           ... done
ERROR: for microcatalog  Cannot start service microcatalog: driver failed programming external connectivity on endpoint microservice-catalog_microcatalog_1 (ef2bdfa5426b8bb7f44af95f6eb47e91753035784e5346c2c3e18149b064de34): Bind for 0.0.0.0:8080 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.                  

You can reproduce it via

version: '3.1'
services:
  db:
    image: postgres
    restart: always
    environment:
      POSTGRES_PASSWORD: kEt#uR6M
  adminer:
    image: adminer
    restart: always
    ports:
      - 8080:9080
  microcatalog:
    image: tillias/microcatalog
    restart: always
    environment:
      DB_HOST: db
      DB_PORT: 5432
      DB_NAME: postgres
      DB_PASSWORD: kEt#uR6M
      DB_USER: postgres
      CSP_IMAGE_SRC: '*'
    ports:
      - 8080:8080

@TimWolla
Copy link
Owner

Is there any possibility to define custom port for adminer?

Sure, specify a different external port in your docker-compose.yml. I believe you got the order of the ports mixed up in 8080:9080, It's host port:container port.

@tillias
Copy link
Author

tillias commented Oct 12, 2020

Hi Tim, you rock, many thanks! That is exactly the case, when I miss Four eyes principle in open source development badly

@tillias tillias closed this as completed Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants