7,540
edits
Changes
Docker
,→compose && swarm common part
Links also express dependency between services in the same way as depends_on, so they determine the order of service startup.
<span style="color: red>Note: If you define both links and networks, services with links between them must share at least one network in common in order to communicate.</span>
* networks: Networks to join. The container created from this service will be connected to the given network(s). (web to new, worker to legacy)
<pre>
services:
web:
build: ./web
networks:
- new
worker:
build: ./worker
networks:
- legacy
</pre>
<hr>
=== swarm only===
<br>