Closed rkesters closed 2 years ago
I confirm I can reproduce what seems to be the same issue with this configuration:
version: '2'
services:
gost-db:
image: geodan/gost-db
volumes:
- postgis:/var/lib/postgresql/data
environment:
POSTGRES_DB: gost
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
gost:
image: geodan/gost
volumes:
- gost_conf:/gostserver/config
depends_on:
- gost-db
environment:
GOST_LOG_VERBOSE_FLAG: 1
GOST_DB_HOST: gost-db
GOST_SERVER_EXTERNAL_URI: "http://localhost:8080"
dashboard:
image: geodan/gost-dashboard
ports:
- "8080:8080"
depends_on:
- gost
volumes:
postgis: {}
gost_conf: {}
const compose = new DockerodeCompose(docker, 'test/test-compose.yml', 'test');
# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c60e16ca78d7 geodan/gost-dashboard "/etc/nginx/docker-e…" 3 seconds ago Up 3 seconds 80/tcp test_dashboard
b9a56b054876 geodan/gost "/bin/sh -c ./gost" 4 seconds ago Up 3 seconds 8080/tcp test_gost
a5218632ba80 geodan/gost-db "docker-entrypoint.s…" 4 seconds ago Up 4 seconds 5432/tcp test_gost-db
$ docker-compose -f test/test-compose.yml up
# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
114e8447c9df geodan/gost-dashboard "/etc/nginx/docker-e…" 2 hours ago Up 9 seconds 80/tcp, 0.0.0.0:8080->8080/tcp test_dashboard_1
b0f65797069f geodan/gost "/bin/sh -c ./gost" 2 hours ago Up 9 seconds 8080/tcp test_gost_1
739fb51c2df6 geodan/gost-db "docker-entrypoint.s…" 5 hours ago Up 10 seconds 5432/tcp test_gost-db_1
We can see here that the 8080
port is correctly exposed by docker-compose
, but not by dockerode
.
Hi,
If you add expose tag(see below) you can solve the "problem", we'll check the docker-compose approaches in this case, because, on our example(var compose = new DockerodeCompose(docker, './test/wordpress.yml', 'wordpress');
) the port is correctly exposed.
ex: expose:
I confirm the expose
tweak works in my case. Thanks!
I confirm the expose tweak works in my case. Thanks!
expose not works for mapping and the regular ports not works
When using the below compose file, the service is not reachable on the defined port. However when I use docker-compose the service is reachable.
Any thoughts, to why.