forked from ITISFoundation/osparc-simcore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-viz.bash
executable file
·56 lines (51 loc) · 2.2 KB
/
docker-compose-viz.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
#
# Creates a graph out of a docker-compose.yml (passed as a first argument)
#
# See https://github.com/pmsipilot/docker-compose-viz
#
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
IFS=$'\n\t'
USERID=$(stat --format=%u "$PWD")
GROUPID=$(stat --format=%g "$PWD")
exec docker run -it \
--name dcv \
--rm \
--user "$USERID:$GROUPID" \
--volume "$PWD:/input" \
pmsipilot/docker-compose-viz render \
--output-format=image \
--output-file="$1.png" \
--horizontal \
--no-ports \
--verbose \
--force "$1"
#
# Usage:
# render [options] [--] [<input-file>]
#
# Arguments:
# input-file Path to a docker compose file [default: "/input/docker-compose.yml"]
#
# Options:
# --override=OVERRIDE Tag of the override file to use [default: "override"]
# -o, --output-file=OUTPUT-FILE Path to a output file (Only for "dot" and "image" output format)
# -m, --output-format=OUTPUT-FORMAT Output format (one of: "dot", "image", "display") [default: "display"]
# --only=ONLY Display a graph only for a given services (multiple values allowed)
# -f, --force Overwrites output file if it already exists
# --no-volumes Do not display volumes
# --no-networks Do not display networks
# --no-ports Do not display ports
# -r, --horizontal Display a horizontal graph
# --ignore-override Ignore override file
# --background=BACKGROUND Set the graph background color [default: "#ffffff"]
# -h, --help Display this help message
# -q, --quiet Do not output any message
# -V, --version Display this application version
# --ansi Force ANSI output
# --no-ansi Disable ANSI output
# -n, --no-interaction Do not ask any interactive question
# -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
#