mirror of
https://github.com/yusing/godoxy.git
synced 2025-07-15 01:54:03 +02:00
readme and dockerfile fix for v0.3 update
This commit is contained in:
parent
43ecd80687
commit
094f75ef46
4 changed files with 40 additions and 18 deletions
|
@ -6,7 +6,7 @@ RUN apk add --no-cache bash tzdata
|
||||||
RUN mkdir /app
|
RUN mkdir /app
|
||||||
COPY bin/go-proxy entrypoint.sh /app/
|
COPY bin/go-proxy entrypoint.sh /app/
|
||||||
COPY templates/ /app/templates
|
COPY templates/ /app/templates
|
||||||
COPY config.default.yml /app/config.yml
|
COPY config.example.yml /app/config.yml
|
||||||
|
|
||||||
RUN chmod +x /app/go-proxy /app/entrypoint.sh
|
RUN chmod +x /app/go-proxy /app/entrypoint.sh
|
||||||
ENV DOCKER_HOST unix:///var/run/docker.sock
|
ENV DOCKER_HOST unix:///var/run/docker.sock
|
||||||
|
|
35
README.md
35
README.md
|
@ -40,6 +40,7 @@ In the examples domain `x.y.z` is used, replace them with your domain
|
||||||
- HTTP round robin load balance support (same subdomain and path across different hosts)
|
- HTTP round robin load balance support (same subdomain and path across different hosts)
|
||||||
- Auto hot-reload on container start / die / stop or config changes.
|
- Auto hot-reload on container start / die / stop or config changes.
|
||||||
- Simple panel to see all reverse proxies and health (visit port [panel port] of go-proxy `https://*.y.z:[panel port]`)
|
- Simple panel to see all reverse proxies and health (visit port [panel port] of go-proxy `https://*.y.z:[panel port]`)
|
||||||
|
|
||||||
- you can customize it by modifying [templates/panel.html](templates/panel.html)
|
- you can customize it by modifying [templates/panel.html](templates/panel.html)
|
||||||
|
|
||||||

|

|
||||||
|
@ -56,10 +57,16 @@ In the examples domain `x.y.z` is used, replace them with your domain
|
||||||
|
|
||||||
### Binary
|
### Binary
|
||||||
|
|
||||||
1. (Optional) Prepare your wildcard (`*.y.z`) SSL cert in `certs/` to enable https. See [Getting SSL Certs](#getting-ssl-certs)
|
1. (Optional) enabled HTTPS
|
||||||
|
|
||||||
- cert / chain / fullchain: `./certs/cert.crt`
|
- Use autocert feature by completing `autocert` in `config.yml`
|
||||||
- private key: `./certs/priv.key`
|
|
||||||
|
- Use existing certificate
|
||||||
|
|
||||||
|
Prepare your wildcard (`*.y.z`) SSL cert in `certs/`
|
||||||
|
|
||||||
|
- cert / chain / fullchain: `./certs/cert.crt`
|
||||||
|
- private key: `./certs/priv.key`
|
||||||
|
|
||||||
2. run the binary `bin/go-proxy`
|
2. run the binary `bin/go-proxy`
|
||||||
|
|
||||||
|
@ -71,10 +78,25 @@ In the examples domain `x.y.z` is used, replace them with your domain
|
||||||
|
|
||||||
2. Add networks to make sure it is in the same network with other containers, or make sure `proxy.<alias>.host` is reachable
|
2. Add networks to make sure it is in the same network with other containers, or make sure `proxy.<alias>.host` is reachable
|
||||||
|
|
||||||
3. (Optional) Mount your wildcard (`*.y.z`) SSL cert to enable https. See [Getting SSL Certs](#getting-ssl-certs)
|
3. (Optional) enable HTTPS
|
||||||
|
|
||||||
- cert / chain / fullchain -> `/app/certs/cert.crt`
|
- Use autocert feature
|
||||||
- private key -> `/app/certs/priv.key`
|
|
||||||
|
1. mount `./certs` to `/app/certs`
|
||||||
|
```yaml
|
||||||
|
go-proxy:
|
||||||
|
...
|
||||||
|
volumes:
|
||||||
|
- ./certs:/app/certs
|
||||||
|
```
|
||||||
|
2. complete `autocert` in `config.yml`
|
||||||
|
|
||||||
|
- Use existing certificate
|
||||||
|
|
||||||
|
Mount your wildcard (`*.y.z`) SSL cert to enable https. See [Getting SSL Certs](#getting-ssl-certs)
|
||||||
|
|
||||||
|
- cert / chain / fullchain -> `/app/certs/cert.crt`
|
||||||
|
- private key -> `/app/certs/priv.key`
|
||||||
|
|
||||||
4. Start `go-proxy` with `docker compose up -d` or `make up`.
|
4. Start `go-proxy` with `docker compose up -d` or `make up`.
|
||||||
|
|
||||||
|
@ -151,6 +173,7 @@ See [providers.example.yml](providers.example.yml)
|
||||||
### Supported cert providers
|
### Supported cert providers
|
||||||
|
|
||||||
- Cloudflare
|
- Cloudflare
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
autocert:
|
autocert:
|
||||||
...
|
...
|
||||||
|
|
|
@ -19,15 +19,14 @@ services:
|
||||||
# - 20000:20100/tcp
|
# - 20000:20100/tcp
|
||||||
# - 20000:20100/udp
|
# - 20000:20100/udp
|
||||||
volumes:
|
volumes:
|
||||||
# if you want https
|
# use existing certificate
|
||||||
# - /path/to/cert.pem:/app/certs/cert.crt:ro
|
# - /path/to/cert.pem:/app/certs/cert.crt:ro
|
||||||
# - /path/to/privkey.pem:/app/certs/priv.key:ro
|
# - /path/to/privkey.pem:/app/certs/priv.key:ro
|
||||||
|
|
||||||
# path to logs
|
# use autocert feature
|
||||||
- ./log:/app/log
|
# - ./certs:/app/certs
|
||||||
|
|
||||||
# if you use default config, or declared local docker provider
|
# if local docker provider is used (by default)
|
||||||
# otherwise comment this line
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
|
|
||||||
# to use custom config
|
# to use custom config
|
||||||
|
|
|
@ -11,12 +11,12 @@ providers:
|
||||||
kind: docker
|
kind: docker
|
||||||
# for value format, see https://docs.docker.com/reference/cli/dockerd/
|
# for value format, see https://docs.docker.com/reference/cli/dockerd/
|
||||||
value: FROM_ENV
|
value: FROM_ENV
|
||||||
remote1:
|
# remote1:
|
||||||
kind: docker
|
# kind: docker
|
||||||
value: ssh://user@10.0.1.1
|
# value: ssh://user@10.0.1.1
|
||||||
remote2:
|
# remote2:
|
||||||
kind: docker
|
# kind: docker
|
||||||
value: tcp://10.0.1.1:2375
|
# value: tcp://10.0.1.1:2375
|
||||||
# provider1:
|
# provider1:
|
||||||
# kind: file
|
# kind: file
|
||||||
# value: provider1.yml
|
# value: provider1.yml
|
||||||
|
|
Loading…
Add table
Reference in a new issue