Files
domain-check/README.md
2023-04-13 06:59:44 +00:00

53 lines
2.1 KiB
Markdown

# domain-check
Creates or updates domain config files in PUBLIC_PROXY_PATH (/etc/user/config/domains/) and SMARTHOST_PROXY_PATH (/etc/user/config/smarthost-domains/)
## How to run
```sh
# docker run \
--detach \
--rm \
--volume /etc/user/config/services/:/services/:ro \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume /usr/bin/docker:/usr/bin/docker:ro \
--volume /etc/user/config/services/tmp:/services/tmp:rw \
registry.format.hu/setup:latest ./entrypoint.sh
```
### Configuration
| ENV | Values | Default | Description
| --- | ------- | ------- | -----------
| PROXY | IP address or domain name | no | sets variable SOURCE
| TARGET | domain name | no | domain name for target ip to resolv
| DOMAIN | domain name | no | config filename and DOMAIN field in config
| LOCATION | path | empty | Alternate location path
| ALLOWED_NETWORKS | networks | no | Allowed networks inside alternate location
| PORT | https port number | no | Smarthost proxy https port
| PUBLIC_PROXY_PATH | path to domains dir | no | usually /etc/user/config/domains/
| SMARTHOST_PROXY_PATH | path to smarthost domains dir | no | usually /etc/user/config/smarthost-domains/
| OPERATION | create,modify | CREATE | create or update
| ROLES | list of roles | no | Roles for name resolver
| SERVICE_FILES | list of service files | no | Service files for name resolver
| HOST_FILE | host file path | /etc/dns/hosts.local | Contains IP address - Domain name pairs
| RETRIES_NUMBER | number to retries | 2 | How many times to retry resolving in case of failure
### Optional parameters for running
| Name | Values | Default | Description
| -------- | -------- | ------- | -----------
| Debug | debug | no | Optional parameter for debugging
## Templates in JSON format
| Keys | Values | Default | Description
| ---------- | ------- | ------- | -----------
| main: | | |
| -services | | | User defined services name *mandatory filed*
| -domain | | | User defined domain name
| networks: | | |
| -name: |