Browse Source

next

master
gsd 3 weeks ago
parent
commit
659ecc3f0a
  1. 3
      Dockerfile
  2. 4
      docker-compose.yaml
  3. 4
      entrypoint.sh

3
Dockerfile

@ -1,3 +1,4 @@
FROM nginx:1.27.4-alpine
RUN apk add apache2-utils
COPY entrypoint.sh /docker-entrypoint.d/entrypoint.sh
COPY entrypoint.sh /docker-entrypoint.d/entrypoint.sh
RUN chmod +x /docker-entrypoint.d/entrypoint.sh

4
docker-compose.yaml

@ -18,12 +18,12 @@ services:
environment:
- COMBO=test:test;test1:test1
- GATEWAY=p_gw:9091;p_gw:9091|user:pass;p_gw:9091|user:pass
- PORT=9091
- PORT=9100
#volumes:
# - $PWD/srv.conf:/etc/nginx/conf.d/srv.conf:ro
# - $PWD/.htpasswd:/etc/nginx/.htpasswd:ro
ports:
- 9091:9091
- 9100:9100
deploy:
resources:
limits:

4
entrypoint.sh

@ -83,6 +83,10 @@ if [ $COUNTER -gt 0 ]; then
proxy_pass_header X-Is-Mirror;
proxy_set_header Authorization "Basic $(echo $GATEWAY | cut -d "|" -f 2 | base64)";
proxy_pass_header Authorization;
limit_except POST {
deny all;
}
}
EOT

Loading…
Cancel
Save