Skip to content

Commit

Permalink
Docker-compose: expose ports instead of publishing
Browse files Browse the repository at this point in the history
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
  • Loading branch information
t4y committed May 3, 2023
1 parent 48d7607 commit 6967440
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docker-compose.nodemicmac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion docker-compose.nodeodm.gpu.intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
image: opendronemap/nodeodm:gpu.intel
devices:
- "/dev/dri"
ports:
expose:
- "3000"
restart: unless-stopped
oom_score_adj: 500
2 changes: 1 addition & 1 deletion docker-compose.nodeodm.gpu.nvidia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
- WO_DEFAULT_NODES
node-odm:
image: opendronemap/nodeodm:gpu
ports:
expose:
- "3000"
restart: unless-stopped
oom_score_adj: 500
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.nodeodm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
- WO_DEFAULT_NODES
node-odm:
image: opendronemap/nodeodm
ports:
expose:
- "3000"
restart: unless-stopped
oom_score_adj: 500
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6967440

Please sign in to comment.