Docker-compose: expose ports instead of publishing

With the
ports:
  - "12345"
syntax docker publishes the ports under an ephemeral port on the host.
Since these ports should presumably only be available to other services,
using expose: instead avoids publishing unnecessary services. See #1336
pull/1337/head
t3Y 2023-05-03 18:10:39 +02:00
rodzic 48d76079bd
commit 69674401c2
5 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -12,7 +12,7 @@ services:
node-micmac-1:
image: opendronemap/nodemicmac
container_name: node-micmac-1
ports:
expose:
- "3000"
restart: unless-stopped
oom_score_adj: 500

Wyświetl plik

@ -15,7 +15,7 @@ services:
image: opendronemap/nodeodm:gpu.intel
devices:
- "/dev/dri"
ports:
expose:
- "3000"
restart: unless-stopped
oom_score_adj: 500

Wyświetl plik

@ -11,7 +11,7 @@ services:
- WO_DEFAULT_NODES
node-odm:
image: opendronemap/nodeodm:gpu
ports:
expose:
- "3000"
restart: unless-stopped
oom_score_adj: 500

Wyświetl plik

@ -11,7 +11,7 @@ services:
- WO_DEFAULT_NODES
node-odm:
image: opendronemap/nodeodm
ports:
expose:
- "3000"
restart: unless-stopped
oom_score_adj: 500

Wyświetl plik

@ -8,7 +8,7 @@ services:
db:
image: opendronemap/webodm_db
container_name: db
ports:
expose:
- "5432"
volumes:
- ${WO_DB_DIR}:/var/lib/postgresql/data:Z