chore: add new examples

This commit is contained in:
Xyphuz 2022-05-25 17:46:53 +08:00
parent a71f82572c
commit 469f1f6122
4 changed files with 12 additions and 4 deletions

View file

@ -30,6 +30,7 @@ jobs:
docker compose -f tests/ymls/ports/docker-compose.yml config -q
docker compose -f tests/ymls/volumes/docker-compose.yml config -q
docker compose -f examples/full-stack-node-app/docker-compose.yml config -q
docker compose -f examples/non-normative/docker-compose.yml config -q
- name: Setup Python 3.10.4
uses: actions/setup-python@v3

View file

@ -16,10 +16,10 @@ runner = CliRunner()
"tests/ymls/extends/docker-compose.yml",
"tests/ymls/links/docker-compose.yml",
"tests/ymls/networks/docker-compose.yml",
"tests/ymls/others/docker-compose.yml",
"tests/ymls/ports/docker-compose.yml",
"tests/ymls/volumes/docker-compose.yml",
"examples/full-stack-node-app/docker-compose.yml",
"examples/non-normative/docker-compose.yml",
],
)
def test_cli(test_file_path: str) -> None:

View file

@ -17,11 +17,15 @@ from compose_viz.volume import Volume, VolumeType
services=[
Service(
name="frontend",
image="build from ./frontend",
image="build from './frontend', image: awesome/frontend",
),
Service(
name="backend",
image="build from backend",
image="build from 'backend' using '../backend.Dockerfile'",
),
Service(
name="db",
image="build from './db'",
),
],
),

View file

@ -6,7 +6,10 @@ services:
build: ./frontend
backend:
image: awesome/backend
build:
context: backend
dockerfile: ../backend.Dockerfile
db:
build:
context: ./db