mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 12:42:34 +02:00
adjusted and simplified default config and compose.yml
This commit is contained in:
parent
eccabc0588
commit
4d7422dd90
2 changed files with 37 additions and 92 deletions
|
@ -28,15 +28,13 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
- ./config:/app/config
|
- ./config:/app/config
|
||||||
|
- ./logs:/app/logs
|
||||||
- ./error_pages:/app/error_pages
|
- ./error_pages:/app/error_pages
|
||||||
|
|
||||||
# (Optional) choose one of below to enable https
|
# To use autocert, certs will be stored in "./certs".
|
||||||
# 1. use existing certificate
|
# You can also use a docker volume to store it
|
||||||
|
- ./certs:/app/certs
|
||||||
|
|
||||||
|
# remove "./certs:/app/certs" and uncomment below to use existing certificate
|
||||||
# - /path/to/certs/cert.crt:/app/certs/cert.crt
|
# - /path/to/certs/cert.crt:/app/certs/cert.crt
|
||||||
# - /path/to/certs/priv.key:/app/certs/priv.key
|
# - /path/to/certs/priv.key:/app/certs/priv.key
|
||||||
|
|
||||||
# 2. use autocert, certs will be stored in ./certs
|
|
||||||
# you can also use a docker volume to store it
|
|
||||||
|
|
||||||
# - ./certs:/app/certs
|
|
||||||
|
|
|
@ -1,78 +1,42 @@
|
||||||
# Autocert (choose one below and uncomment to enable)
|
# Autocert (choose one below and uncomment to enable)
|
||||||
#
|
#
|
||||||
# 1. use existing cert
|
# 1. use existing cert
|
||||||
#
|
|
||||||
# autocert:
|
# autocert:
|
||||||
# provider: local
|
# provider: local
|
||||||
#
|
|
||||||
# cert_path: certs/cert.crt # optional, uncomment only if you need to change it
|
|
||||||
# key_path: certs/priv.key # optional, uncomment only if you need to change it
|
|
||||||
#
|
|
||||||
# 2. cloudflare
|
# 2. cloudflare
|
||||||
#
|
|
||||||
# autocert:
|
# autocert:
|
||||||
# provider: cloudflare
|
# provider: cloudflare
|
||||||
# email: abc@gmail.com # ACME Email
|
# email: abc@gmail.com # ACME Email
|
||||||
# domains: # a list of domains for cert registration
|
# domains: # a list of domains for cert registration
|
||||||
# - "*.y.z" # remember to use double quotes to surround wildcard domain
|
# - "*.domain.com"
|
||||||
|
# - "domain.com"
|
||||||
# options:
|
# options:
|
||||||
# auth_token: c1234565789-abcdefghijklmnopqrst # your zone API token
|
# auth_token: c1234565789-abcdefghijklmnopqrst # your zone API token
|
||||||
#
|
|
||||||
# 3. other providers, check docs/dns_providers.md for more
|
# 3. other providers, see https://github.com/yusing/go-proxy/wiki/Supported-DNS%E2%80%9001-Providers#supported-dns-01-providers
|
||||||
|
|
||||||
entrypoint:
|
entrypoint:
|
||||||
middlewares:
|
# Below define an example of middleware config
|
||||||
# this part blocks all non-LAN HTTP traffic
|
# 1. block non local IP connections
|
||||||
# remove if you don't want this
|
# 2. redirect HTTP to HTTPS
|
||||||
- use: CIDRWhitelist
|
#
|
||||||
allow:
|
# middlewares:
|
||||||
- "127.0.0.1"
|
# - use: CIDRWhitelist
|
||||||
- "10.0.0.0/8"
|
# allow:
|
||||||
- "172.16.0.0/12"
|
# - "127.0.0.1"
|
||||||
- "192.168.0.0/16"
|
# - "10.0.0.0/8"
|
||||||
status: 403
|
# - "172.16.0.0/12"
|
||||||
message: "Forbidden"
|
# - "192.168.0.0/16"
|
||||||
# end of CIDRWhitelist
|
# status: 403
|
||||||
|
# message: "Forbidden"
|
||||||
|
# - use: RedirectHTTP
|
||||||
|
|
||||||
# this part redirects HTTP to HTTPS
|
# below enables access log
|
||||||
# remove if you don't want this
|
access_log:
|
||||||
- use: RedirectHTTP
|
format: combined
|
||||||
|
path: /app/logs/entrypoint.log
|
||||||
# access_log:
|
|
||||||
# buffer_size: 1024
|
|
||||||
# path: /var/log/example.log
|
|
||||||
# filters:
|
|
||||||
# status_codes:
|
|
||||||
# values:
|
|
||||||
# - 200-299
|
|
||||||
# - 101
|
|
||||||
# method:
|
|
||||||
# values:
|
|
||||||
# - GET
|
|
||||||
# host:
|
|
||||||
# values:
|
|
||||||
# - example.y.z
|
|
||||||
# headers:
|
|
||||||
# negative: true
|
|
||||||
# values:
|
|
||||||
# - foo=bar
|
|
||||||
# - baz
|
|
||||||
# cidr:
|
|
||||||
# values:
|
|
||||||
# - 192.168.10.0/24
|
|
||||||
# fields:
|
|
||||||
# headers:
|
|
||||||
# default: keep
|
|
||||||
# config:
|
|
||||||
# foo: redact
|
|
||||||
# query:
|
|
||||||
# default: drop
|
|
||||||
# config:
|
|
||||||
# foo: keep
|
|
||||||
# cookies:
|
|
||||||
# default: redact
|
|
||||||
# config:
|
|
||||||
# foo: keep
|
|
||||||
|
|
||||||
providers:
|
providers:
|
||||||
# include files are standalone yaml files under `config/` directory
|
# include files are standalone yaml files under `config/` directory
|
||||||
|
@ -84,6 +48,7 @@ providers:
|
||||||
docker:
|
docker:
|
||||||
# $DOCKER_HOST implies environment variable `DOCKER_HOST` or unix:///var/run/docker.sock by default
|
# $DOCKER_HOST implies environment variable `DOCKER_HOST` or unix:///var/run/docker.sock by default
|
||||||
local: $DOCKER_HOST
|
local: $DOCKER_HOST
|
||||||
|
|
||||||
# explicit only mode
|
# explicit only mode
|
||||||
# only containers with explicit aliases will be proxied
|
# only containers with explicit aliases will be proxied
|
||||||
# add "!" after provider name to enable explicit only mode
|
# add "!" after provider name to enable explicit only mode
|
||||||
|
@ -106,28 +71,10 @@ providers:
|
||||||
# - name: discord
|
# - name: discord
|
||||||
# provider: webhook
|
# provider: webhook
|
||||||
# url: https://discord.com/api/webhooks/...
|
# url: https://discord.com/api/webhooks/...
|
||||||
# template: discord
|
# template: discord # this means use payload template from internal/notif/templates/discord.json
|
||||||
# # payload: | # discord template implies the following
|
|
||||||
# # {
|
# Check https://github.com/yusing/go-proxy/wiki/Certificates-and-domain-matching#domain-matching
|
||||||
# # "embeds": [
|
# for explaination of `match_domains`
|
||||||
# # {
|
|
||||||
# # "title": $title,
|
|
||||||
# # "fields": $fields,
|
|
||||||
# # "color": "$color"
|
|
||||||
# # }
|
|
||||||
# # ]
|
|
||||||
# # }
|
|
||||||
# if match_domains not defined
|
|
||||||
# any host = alias+[any domain] will match
|
|
||||||
# i.e. https://app1.y.z will match alias app1 for any domain y.z
|
|
||||||
# but https://app1.node1.y.z will only match alias "app.node1"
|
|
||||||
#
|
|
||||||
# if match_domains defined
|
|
||||||
# only host = alias+[one of match_domains] will match
|
|
||||||
# i.e. match_domains = [node1.my.app, my.site]
|
|
||||||
# https://app1.my.app, https://app1.my.net, etc. will not match even if app1 exists
|
|
||||||
# only https://*.node1.my.app and https://*.my.site will match
|
|
||||||
#
|
|
||||||
#
|
#
|
||||||
# match_domains:
|
# match_domains:
|
||||||
# - my.site
|
# - my.site
|
||||||
|
|
Loading…
Add table
Reference in a new issue