version: "3.8" services: towers-ingress: init: true depends_on: - store image: schmelczera/towers-ingress networks: - network deploy: replicas: 1 resources: limits: cpus: "0.2" memory: 32M reservations: cpus: "0.1" memory: 16M placement: constraints: - "node.hostname == node-2" update_config: parallelism: 1 failure_action: rollback delay: 10s monitor: 10s restart_policy: condition: on-failure window: 30s volumes: - sockets:/var/www/sockets towers-store: init: true image: schmelczera/towers-store networks: - network deploy: replicas: 1 resources: limits: cpus: "0.2" memory: 64M reservations: cpus: "0.05" memory: 32M placement: constraints: - "node.hostname == node-2" restart_policy: condition: on-failure window: 30s volumes: - sockets:/home/backend/sockets towers-db: init: true image: postgres:12.1-alpine networks: - network deploy: replicas: 1 resources: limits: cpus: "0.2" memory: 64M reservations: cpus: "0.05" memory: 32M restart_policy: condition: on-failure window: 30s volumes: - /shared/towers/db:/var/lib/postgresql/data networks: network: driver: overlay volumes: sockets: driver: local