Hi i'm working with docker-compose file to work with postgresql and adminer(database interface).
I followed the instruction on the postgres image on docker hub and do docker stack deploy -c docker-compose.yml postgres_test, but when i try to connect to 45.77.46.240(my host machine ip):8282(adminer port) from another machine it response with a 'ERR_CONNECTION_TIMED_OUT'
I wonder why can i connect to the visualizer on port 8080 it worked but not on the adminer?
Here my docker-compose.yml
version: "3"
services:
adminer:
image: adminer
restart: always
ports:
- "8282:8282"
db:
image: postgres
networks:
- webnet
environment:
POSTGRES_PASSWORD: 123
POSTGRES_USER: postgres
POSTGRES_DB: real_estate
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
web:
# replace username/repo:tag with your name and image details
image: my_user_name/test_image:image1
ports:
- "8081:8081"
networks:
- webnet
environment:
DB_HOST: db
visualizer:
image: dockersamples/visualizer:stable
ports:
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
deploy:
placement:
constraints: [node.role == manager]
networks:
- webnet
networks:
webnet: