version: '3.8' services: back: image: alpine command: echo "Hello there!!" depends_on: - db networks: - backnet db: image: nginx:alpine networks: - backnet volumes: - data:/test front: image: nginx:alpine networks: - frontnet networks: frontnet: backnet: volumes: data: