On 1) I would expect the restart:
to be nested under the service/container you want to set it for. So the example given in the depends_on section of the compose reference could be:
version: '2'
services:
web:
build: .
restart: always # <--- my addition
depends_on:
- db
- redis
redis:
image: redis
db:
image: postgres
Does that not work for you if you test out a similar addition in your environment?
Regarding 2) I would simply expect declarations as depends_on:
to work just as it did before you add restart:
So in the example given above a natural consequence after a restart would be that the dependent services db
and redis
will be started before web
. Something similar should implicitly be true for volumes and networks your services refer to.