mirror of
https://github.com/openziti/zrok.git
synced 2024-11-07 08:44:14 +01:00
eliminate ziti steps
This commit is contained in:
parent
89aea54432
commit
f642de22c5
@ -53,8 +53,6 @@ CADDY_DNS_PLUGIN=cloudflare
|
|||||||
CADDY_DNS_PLUGIN_TOKEN=abcd1234
|
CADDY_DNS_PLUGIN_TOKEN=abcd1234
|
||||||
CADDY_ACME_EMAIL=me@example.com
|
CADDY_ACME_EMAIL=me@example.com
|
||||||
|
|
||||||
# this must == ziti.${ZROK_DNS_ZONE}
|
|
||||||
ZITI_CTRL_ADVERTISED_ADDRESS=ziti.share.example.com
|
|
||||||
ZITI_PWD=zitiadminpw
|
ZITI_PWD=zitiadminpw
|
||||||
|
|
||||||
ZROK_ADMIN_TOKEN=zroktoken
|
ZROK_ADMIN_TOKEN=zroktoken
|
||||||
@ -62,6 +60,7 @@ ZROK_USER_PWD=zrokuserpw
|
|||||||
```
|
```
|
||||||
|
|
||||||
```bash title=".env options"
|
```bash title=".env options"
|
||||||
|
# ziti ports
|
||||||
ZITI_CTRL_ADVERTISED_PORT=1280
|
ZITI_CTRL_ADVERTISED_PORT=1280
|
||||||
ZITI_ROUTER_PORT=3022
|
ZITI_ROUTER_PORT=3022
|
||||||
|
|
||||||
@ -78,18 +77,12 @@ CADDY_ACME_API=https://acme-staging-v02.api.letsencrypt.org/directory
|
|||||||
|
|
||||||
### Start the Docker Compose Project
|
### Start the Docker Compose Project
|
||||||
|
|
||||||
1. Start the ziti network. This runs `ziti edge quickstart` ([link to readme](https://github.com/openziti/ziti/tree/main/quickstart/docker/all-in-one#readme)).
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker compose --profile ziti up --detach
|
|
||||||
```
|
|
||||||
|
|
||||||
1. Start the zrok instance.
|
1. Start the zrok instance.
|
||||||
|
|
||||||
The container images for zrok (including caddy) are built in this step. This provides a simple configuration to get started. You can modify the templates named like `*.envsubst` or mount a customized configuration file to mask the one that was built in.
|
The container images for zrok (including caddy) are built in this step. This provides a simple configuration to get started. You can modify the templates named like `*.envsubst` or mount a customized configuration file to mask the one that was built in.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose --profile zrok up --build --detach
|
docker compose up --build --detach
|
||||||
```
|
```
|
||||||
|
|
||||||
### Set up a User Account
|
### Set up a User Account
|
||||||
|
@ -4,23 +4,20 @@
|
|||||||
services:
|
services:
|
||||||
ziti-quickstart:
|
ziti-quickstart:
|
||||||
image: ${ZITI_CLI_IMAGE:-docker.io/openziti/ziti-cli}:${ZITI_CLI_TAG:-latest}
|
image: ${ZITI_CLI_IMAGE:-docker.io/openziti/ziti-cli}:${ZITI_CLI_TAG:-latest}
|
||||||
profiles:
|
|
||||||
- ziti
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
zrok-instance:
|
zrok-instance:
|
||||||
# this allows other containers to use the same external DNS name to reach the quickstart container from within the
|
# 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
|
# Docker network that clients outside the Docker network use to reach the quickstart container via port forwarding
|
||||||
aliases:
|
aliases:
|
||||||
- ${ZITI_CTRL_ADVERTISED_ADDRESS:-ziti-controller}
|
- ziti.${ZROK_DNS_ZONE}
|
||||||
- ${ZITI_ROUTER_ADVERTISED_ADDRESS:-ziti-router}
|
|
||||||
entrypoint:
|
entrypoint:
|
||||||
- bash
|
- bash
|
||||||
- -euc
|
- -euc
|
||||||
- |
|
- |
|
||||||
ZITI_CMD+=" --ctrl-address ${ZITI_CTRL_ADVERTISED_ADDRESS:-ziti-quickstart}"\
|
ZITI_CMD+=" --ctrl-address ziti.${ZROK_DNS_ZONE}"\
|
||||||
" --ctrl-port ${ZITI_CTRL_ADVERTISED_PORT:-1280}"\
|
" --ctrl-port ${ZITI_CTRL_ADVERTISED_PORT:-1280}"\
|
||||||
" --router-address ${ZITI_ROUTER_ADVERTISED_ADDRESS:-${ZITI_CTRL_ADVERTISED_ADDRESS:-ziti-quickstart}}"\
|
" --router-address ziti.${ZROK_DNS_ZONE}"\
|
||||||
" --router-port ${ZITI_ROUTER_PORT:-3022}"\
|
" --router-port ${ZITI_ROUTER_PORT:-3022}"\
|
||||||
" --password ${ZITI_PWD:-admin}"
|
" --password ${ZITI_PWD:-admin}"
|
||||||
echo "DEBUG: run command is: ziti $${@} $${ZITI_CMD}"
|
echo "DEBUG: run command is: ziti $${@} $${ZITI_CMD}"
|
||||||
@ -71,16 +68,12 @@ services:
|
|||||||
# add a health check for the quickstart network
|
# add a health check for the quickstart network
|
||||||
ziti-quickstart-check:
|
ziti-quickstart-check:
|
||||||
image: busybox
|
image: busybox
|
||||||
profiles:
|
|
||||||
- ziti
|
|
||||||
command: echo "Ziti is cooking"
|
command: echo "Ziti is cooking"
|
||||||
depends_on:
|
depends_on:
|
||||||
ziti-quickstart:
|
ziti-quickstart:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
||||||
zrok-permissions:
|
zrok-permissions:
|
||||||
profiles:
|
|
||||||
- zrok
|
|
||||||
image: busybox
|
image: busybox
|
||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
@ -93,8 +86,6 @@ services:
|
|||||||
- zrok_frontend:/var/lib/zrok-frontend
|
- zrok_frontend:/var/lib/zrok-frontend
|
||||||
|
|
||||||
zrok-controller:
|
zrok-controller:
|
||||||
profiles:
|
|
||||||
- zrok
|
|
||||||
depends_on:
|
depends_on:
|
||||||
zrok-permissions:
|
zrok-permissions:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
@ -128,8 +119,6 @@ services:
|
|||||||
CADDY_ACME_EMAIL: ${CADDY_ACME_EMAIL} # login email address (initial user account)
|
CADDY_ACME_EMAIL: ${CADDY_ACME_EMAIL} # login email address (initial user account)
|
||||||
|
|
||||||
zrok-frontend:
|
zrok-frontend:
|
||||||
profiles:
|
|
||||||
- zrok
|
|
||||||
depends_on:
|
depends_on:
|
||||||
zrok-permissions:
|
zrok-permissions:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
@ -169,8 +158,6 @@ services:
|
|||||||
ZITI_PWD: ${ZITI_PWD} # ziti controller admin password
|
ZITI_PWD: ${ZITI_PWD} # ziti controller admin password
|
||||||
|
|
||||||
caddy:
|
caddy:
|
||||||
profiles:
|
|
||||||
- zrok
|
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: ./caddy.Dockerfile
|
dockerfile: ./caddy.Dockerfile
|
||||||
|
Loading…
Reference in New Issue
Block a user