mirror of
https://github.com/docker/compose.git
synced 2026-02-09 01:59:22 +08:00
32 lines
516 B
YAML
32 lines
516 B
YAML
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
|
|
build:
|
|
build:
|
|
dockerfile_inline: "FROM base"
|
|
additional_contexts:
|
|
base: "service:build_base"
|
|
build_base:
|
|
build:
|
|
dockerfile_inline: "FROM alpine"
|
|
networks:
|
|
frontnet:
|
|
backnet:
|
|
volumes:
|
|
data:
|