mirror of
https://github.com/openziti/ziti.git
synced 2026-10-15 16:41:12 +00:00
55 lines
1.8 KiB
YAML
55 lines
1.8 KiB
YAML
services:
|
|
initialize:
|
|
image: busybox
|
|
command: chown -Rc ${ZIGGY_UID:-1000} /persistent
|
|
user: root
|
|
environment:
|
|
HOME: /persistent
|
|
# PFXLOG_NO_JSON: "true"
|
|
volumes:
|
|
- ./persistent:/persistent
|
|
quickstart:
|
|
depends_on:
|
|
initialize:
|
|
condition: service_completed_successfully
|
|
image: ${ZITI_QUICK_IMAGE:-docker.io/openziti/ziti-cli}:${ZITI_QUICK_TAG:-latest}
|
|
restart: unless-stopped
|
|
build:
|
|
context: ${ZITI_SRC_ROOT:-../../../}
|
|
dockerfile: ./quickstart/docker/minimal/Dockerfile
|
|
args: {}
|
|
networks:
|
|
quickstart:
|
|
# this allows other containers to use the external DNS name to reach the quickstart container inside the docker
|
|
# network
|
|
aliases:
|
|
- ${EXTERNAL_DNS:-${EXTERNAL_IP:-null}}
|
|
entrypoint:
|
|
- bash
|
|
- -euc
|
|
- |
|
|
ZITI_CMD+=" --ctrl-address ${EXTERNAL_DNS:-${EXTERNAL_IP:-127.0.0.1}}"\
|
|
" --router-address ${EXTERNAL_DNS:-${EXTERNAL_IP:-127.0.0.1}}"\
|
|
" --password ${ZITI_PWD:-admin}"
|
|
echo "DEBUG: run command is: ziti $${@} $${ZITI_CMD}"
|
|
exec ziti "$${@}" $${ZITI_CMD}
|
|
command: -- edge quickstart --home /persistent
|
|
user: ${ZIGGY_UID:-1000}
|
|
environment:
|
|
HOME: /persistent
|
|
PFXLOG_NO_JSON: "true"
|
|
volumes:
|
|
- ./persistent:/persistent
|
|
ports:
|
|
- ${ZITI_INTERFACE:-0.0.0.0}:${ZITI_CTRL_EDGE_ADVERTISED_PORT:-1280}:${ZITI_CTRL_EDGE_ADVERTISED_PORT:-1280}
|
|
- ${ZITI_INTERFACE:-0.0.0.0}:${ZITI_ROUTER_PORT:-3022}:${ZITI_ROUTER_PORT:-3022}
|
|
|
|
# define a custom network so that we can also define a DNS alias for the quickstart container
|
|
networks:
|
|
quickstart:
|
|
driver: bridge
|
|
driver_opts:
|
|
com.docker.network.bridge.enable_icc: "true"
|
|
com.docker.network.bridge.enable_ip_masquerade: "true"
|
|
com.docker.network.bridge.hairpin_mode: "true"
|