Files
zeekay 241625e7d9 rename: ziti → zt across all paths
- Repo names: ziti-* → zt-*
- Go modules: github.com/hanzozt/ziti → github.com/hanzozt/zt
- Docker images: hanzozt/ziti-* → hanzozt/zt-*
- C/Java/JS symbols: ziti_* → zt_*
- File and directory names updated
2026-02-18 18:34:19 -08:00

80 lines
2.8 KiB
YAML

services:
quickstart:
image: ${ZITI_CLI_IMAGE:-docker.io/hanzozt/zt-controller}:${ZITI_CLI_TAG:-latest}
restart: unless-stopped
networks:
quickstart:
# this allows other containers to use the same external DNS name to reach the quickstart container from within the
# Docker network that clients outside the Docker network use to reach the quickstart container via port forwarding
aliases:
- ${ZITI_CTRL_ADVERTISED_ADDRESS:-zt-controller}
- ${ZITI_ROUTER_ADVERTISED_ADDRESS:-zt-router}
entrypoint:
- bash
- -euc
- |
ZITI_CMD+=" --ctrl-address ${ZITI_CTRL_ADVERTISED_ADDRESS:-quickstart}"\
" --ctrl-port ${ZITI_CTRL_ADVERTISED_PORT:-1280}"\
" --router-address ${ZITI_ROUTER_ADVERTISED_ADDRESS:-${ZITI_CTRL_ADVERTISED_ADDRESS:-quickstart}}"\
" --router-port ${ZITI_ROUTER_PORT:-3022}"\
" --password ${ZITI_PWD:-admin}"
echo "DEBUG: run command is: zt $${@} $${ZITI_CMD}"
exec zt "$${@}" $${ZITI_CMD}
command: -- edge quickstart --home /home/ziggy/quickstart
user: ${ZIGGY_UID:-1000}
environment:
PFXLOG_NO_JSON: "${PFXLOG_NO_JSON:-true}"
ZITI_ROUTER_NAME: ${ZITI_ROUTER_NAME:-quickstart-router}
volumes:
# store the quickstart state in a named volume "zt_home" or store the quickstart state on the Docker host in a
# directory, ZITI_HOME
- ${ZITI_HOME:-zt_home}:/home/ziggy
ports:
- ${ZITI_INTERFACE:-0.0.0.0}:${ZITI_CTRL_ADVERTISED_PORT:-1280}:${ZITI_CTRL_ADVERTISED_PORT:-1280}
- ${ZITI_INTERFACE:-0.0.0.0}:${ZITI_ROUTER_PORT:-3022}:${ZITI_ROUTER_PORT:-3022}
expose:
- ${ZITI_CTRL_ADVERTISED_PORT:-1280}
- ${ZITI_ROUTER_PORT:-3022}
depends_on:
quickstart-init:
condition: service_completed_successfully
healthcheck:
test:
- CMD
- zt
- agent
- stats
interval: 3s
timeout: 3s
retries: 5
start_period: 30s
# this service is used to initialize the zt_home volume by setting the owner to the UID of the user running the
# quickstart container
quickstart-init:
image: busybox
command: chown -Rc ${ZIGGY_UID:-1000} /home/ziggy
user: root
volumes:
# store the quickstart state in a named volume "zt_home" or store the quickstart state on the Docker host in a
# directory, ZITI_HOME
- ${ZITI_HOME:-zt_home}:/home/ziggy
# add a health check for the quickstart network
quickstart-check:
image: busybox
command: echo "Ziti is cooking"
depends_on:
quickstart:
condition: service_healthy
# define a custom network so that we can also define a DNS alias for the quickstart container
networks:
quickstart:
driver: bridge
volumes:
# this will not be used if you switch from named volume to bind mount volume
zt_home:
driver: local