summaryrefslogtreecommitdiffstats
path: root/bin/deploy.sh
blob: 3a0116732e7d4c0a9817a7a8d8ff7dd1d1630590 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
generated by cgit v1.2.3 (git 2.39.1) at 2025-11-06 23:34:32 +0000
 


ot;
  printf "Usage: sh deploy.sh your-stack-name [OPTIONS]\n"
  printf "You can display more information about usage with -h or --help.\n"
  exit 1
}

help() {
  cat <<EOF
# USAGE
sh deploy.sh [your-stack-name] [OPTIONS]

# DESCRIPTION
The version command allows Dotig to print its version and to check for a new release.

# OPTIONS
If [your-stack-name] is not provided:
-h, --help          Print this help.

If [your-stack-name] is provided:
--orchestrator string    Orchestrator to use (swarm|kubernetes|all)
--prune                  Prune services that are no longer referenced
--resolve-image string   Query the registry to resolve image digest and
                          supported platforms
                          ("always"|"changed"|"never") (default "always")
--with-registry-auth     Send registry authentication details to Swarm agents

# BUGS
If you find any bug, you can report it on https://github.com/ArmandPhilippot/apcom/issues.
EOF

  exit
}

deploy() {
  [ $# -eq 0 ] && error
  [ "$1" = "-h" ] || [ "$1" = "--help" ] && help

  _stack_name="$1"
  shift

  loadenvs
  docker stack deploy -c docker-compose.yml "$@" "$_stack_name"
}

deploy "$@"