Skip to content

Commit

Permalink
feat: optionally display network bindings
Browse files Browse the repository at this point in the history
Add a `-N` option to show network bindings. They will be displayed
as parallelograms, and show the alias(es) + ip(s) if any.

This only works for networks defined under services, "global"
networks are ignored.

The doc is updated accordingly.
  • Loading branch information
derlin committed Mar 14, 2023
1 parent 9bc63af commit 930b1fd
Show file tree
Hide file tree
Showing 44 changed files with 273 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
key: ${{ runner.os }}-playwright

- name: Run tests
run: ./gradlew test
run: ./gradlew check

- name: Upload Test Results
uses: actions/upload-artifact@v2
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ tasks.test {
exceptionFormat = TestExceptionFormat.FULL
}
filter {
// use ./gradlew test -Pgenerate to generate also the docs
// use ./gradlew test -Pdocs to generate also the docs
if (project.hasProperty("docs")) {
environment(mapOf("GEN_DOCS" to "1"))
// excludeTestsMatching("*Generator*")
Expand Down
5 changes: 3 additions & 2 deletions docs/_includes/generated/contactapp.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% raw %}# P
{% raw %}# PN
# inspired from:
# https://github.com/gabrielgu/contact-book/blob/2f1fe0fe7e3ac98494cd0cc3a12b9b9ca77e0570/docker-compose.yaml
version: "3.8"
Expand Down Expand Up @@ -69,4 +69,5 @@ services:
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"

volumes:
settings: ./settings{% endraw %}
settings: ./settings
{% endraw %}
9 changes: 5 additions & 4 deletions docs/_includes/generated/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ Usage: cli [OPTIONS] [docker-compose-path]
You can further customize the result using the options below.

Processing options:
-p, --ports / -P, --no-ports Extract and display ports
-v, --volumes / -V, --no-volumes Extract and display volumes
-l, --ilinks / -L, --no-ilinks Try to find implicit links between services by looking at the
environment variables
-p, --ports / -P, --no-ports Extract and display ports
-v, --volumes / -V, --no-volumes Extract and display volumes
-n, --networks / -N, --no-networks Extract and display networks
-l, --ilinks / -L, --no-ilinks Try to find implicit links between services by looking at the
environment variables

Output options:
-f, --format [TEXT|MARKDOWN|EDITOR|PREVIEW|PNG|SVG]
Expand Down
5 changes: 5 additions & 0 deletions docs/_includes/generated/mailman-dark.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ flowchart TB
P1((8024)) -.-> mailmancore
P2((8000)) -.-> mailmanweb
P3((8080)) -.-> mailmanweb
mailmancore -.- mailman[/mailman/]
mailmanweb -.- mailman
database -.- mailman
classDef volumes fill:#0f544e,stroke:#23968b
class Voptmailmancore,Voptmailmanweb,Voptmailmandatabase volumes
classDef ports fill:#5a5757,stroke:#b6c2ff
class P0,P1,P2,P3 ports
classDef nets fill:#3f51b5,stroke:#81B1DB
class mailman nets
```
5 changes: 5 additions & 0 deletions docs/_includes/generated/mailman-dark.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@ flowchart TB
P1((8024)) -.-> mailmancore
P2((8000)) -.-> mailmanweb
P3((8080)) -.-> mailmanweb
mailmancore -.- mailman[/mailman/]
mailmanweb -.- mailman
database -.- mailman

classDef volumes fill:#0f544e,stroke:#23968b
class Voptmailmancore,Voptmailmanweb,Voptmailmandatabase volumes
classDef ports fill:#5a5757,stroke:#b6c2ff
class P0,P1,P2,P3 ports
classDef nets fill:#3f51b5,stroke:#81B1DB
class mailman nets
{% endraw %}
5 changes: 5 additions & 0 deletions docs/_includes/generated/mailman-default.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ flowchart TB
P1((8024)) -.-> mailmancore
P2((8000)) -.-> mailmanweb
P3((8080)) -.-> mailmanweb
mailmancore -.- mailman[/mailman/]
mailmanweb -.- mailman
database -.- mailman
classDef volumes fill:#fdfae4,stroke:#867a22
class Voptmailmancore,Voptmailmanweb,Voptmailmandatabase volumes
classDef ports fill:#f8f8f8,stroke:#ccc
class P0,P1,P2,P3 ports
classDef nets fill:#fbfff7,stroke:#8bc34a
class mailman nets
```
5 changes: 5 additions & 0 deletions docs/_includes/generated/mailman-default.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@ flowchart TB
P1((8024)) -.-> mailmancore
P2((8000)) -.-> mailmanweb
P3((8080)) -.-> mailmanweb
mailmancore -.- mailman[/mailman/]
mailmanweb -.- mailman
database -.- mailman

classDef volumes fill:#fdfae4,stroke:#867a22
class Voptmailmancore,Voptmailmanweb,Voptmailmandatabase volumes
classDef ports fill:#f8f8f8,stroke:#ccc
class P0,P1,P2,P3 ports
classDef nets fill:#fbfff7,stroke:#8bc34a
class mailman nets
{% endraw %}
3 changes: 2 additions & 1 deletion docs/_includes/generated/mailman.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,5 @@ networks:
driver: default
config:
-
subnet: 172.19.199.0/24{% endraw %}
subnet: 172.19.199.0/24
{% endraw %}
3 changes: 2 additions & 1 deletion docs/_includes/generated/productpage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ services:
depends_on:
- reviews
- ratings
- details{% endraw %}
- details
{% endraw %}
Binary file modified docs/assets/generated/contactapp-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/assets/generated/contactapp-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/assets/generated/contactapp-default.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/assets/generated/links-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/assets/generated/links-default.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/generated/mailman-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/assets/generated/mailman-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/generated/mailman-default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/assets/generated/mailman-default.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/assets/generated/networks-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 930b1fd

Please sign in to comment.