Browse Source

adding experimental gitea-registration-proxy

forwarding-support
forest 3 months ago
parent
commit
c02d08395a
2 changed files with 33 additions and 3 deletions
  1. +24
    -2
      docker-compose.yml
  2. +9
    -1
      main.go

+ 24
- 2
docker-compose.yml View File

@ -31,7 +31,7 @@ services:
target: /caddysocket
caddy-config:
image: sequentialread/caddy-config:0.0.13
image: sequentialread/caddy-config:0.0.14
#mem_limit: 50m
networks:
- sequentialread
@ -162,7 +162,6 @@ services:
- LOGADAPTER_DOMAINS_2_MATCHHOSTNAMEREGEX=(goatcounter|influxdb)
- LOGADAPTER_DOMAINS_2_CONTENTTYPEWHITELISTREGEX=DROP_ALL
influxdb:
image: influxdb:1.8.4
restart: always
@ -372,6 +371,29 @@ services:
sequentialread-3000-public-hostnames: "www.git.sequentialread.com,git.sequentialread.com,git.beta.sequentialread.com"
sequentialread-3000-container-protocol: http
gitea-registration-proxy:
image: sequentialread/gitea-registration-proxy:0.0.0
restart: always
networks:
- gitea
- blog
environment:
- DEBUG=gitea-registration-proxy
- REGPROXY_GITEA=gitea:3000
- REGPROXY_HOST=0.0.0.0
- REGPROXY_POWCAPTCHAAPIURL=http://captcha:2370
- REGPROXY_POWCAPTCHAAPITOKEN=${REGPROXY_POWCAPTCHAAPITOKEN}
depends_on:
- gitea
- captcha
labels:
sequentialread-8080-public-port: 443
sequentialread-8080-public-protocol: https
sequentialread-8080-public-hostnames: "www.git.sequentialread.com,git.sequentialread.com,git.beta.sequentialread.com"
sequentialread-8080-public-paths: "/user/sign_up"
sequentialread-8080-container-protocol: http
postgres:
image: postgres:13.3-alpine
restart: always


+ 9
- 1
main.go View File

@ -295,8 +295,16 @@ func IngressConfig() error {
if port == 443 {
allHostnames := []string{}
hostnamesMap := map[string]bool{}
for _, container := range containerConfigs {
allHostnames = append(allHostnames, strings.Split(container.PublicHostnames, ",")...)
containerHostnames := strings.Split(container.PublicHostnames, ",")
for _, hostname := range containerHostnames {
if !hostnamesMap[hostname] {
allHostnames = append(allHostnames, hostname)
}
hostnamesMap[hostname] = true
}
}
sort.Strings(allHostnames)


Loading…
Cancel
Save