mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-14 16:55:00 +01:00
nginx
This commit is contained in:
parent
06308cea0c
commit
1d186dd00d
5 changed files with 35 additions and 10 deletions
18
nginx/nginx.conf
Normal file
18
nginx/nginx.conf
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
events {
|
||||||
|
worker_connections 512;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
|
||||||
|
location /docker-registry {
|
||||||
|
rewrite /docker-registry(.*) $1 break;
|
||||||
|
proxy_pass http://registry:5000;
|
||||||
|
proxy_redirect off;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
server_tokens off;
|
||||||
|
}
|
||||||
6
nginx/run.sh
Executable file
6
nginx/run.sh
Executable file
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
docker run -d -p 8080:80 --restart=always --name nginx \
|
||||||
|
-v `pwd`/nginx.conf:/etc/nginx/nginx.conf:ro \
|
||||||
|
$@ \
|
||||||
|
nginx:latest
|
||||||
|
|
@ -12,18 +12,15 @@ storage:
|
||||||
maxthreads: 100
|
maxthreads: 100
|
||||||
delete:
|
delete:
|
||||||
enabled: true
|
enabled: true
|
||||||
auth:
|
#token:
|
||||||
token:
|
# autoredirect: true
|
||||||
autoredirect: true
|
# realm: token-realm
|
||||||
realm: token-realm
|
# service: token-service
|
||||||
service: token-service
|
# issuer: registry-token-issuer
|
||||||
issuer: registry-token-issuer
|
# rootcertbundle: /root/certs/bundle
|
||||||
rootcertbundle: /root/certs/bundle
|
|
||||||
http:
|
http:
|
||||||
addr: localhost:5000
|
addr: 0.0.0.0:5000
|
||||||
prefix: /docker-registry
|
prefix: /docker-registry
|
||||||
draintimeout: 60s
|
draintimeout: 60s
|
||||||
debug:
|
|
||||||
addr: localhost:5001
|
|
||||||
headers:
|
headers:
|
||||||
X-Content-Type-Options: [nosniff]
|
X-Content-Type-Options: [nosniff]
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,5 @@
|
||||||
|
|
||||||
docker run -d -p 5000:5000 --restart=always --name registry \
|
docker run -d -p 5000:5000 --restart=always --name registry \
|
||||||
-v `pwd`/config.yml:/etc/docker/registry/config.yml \
|
-v `pwd`/config.yml:/etc/docker/registry/config.yml \
|
||||||
|
$@ \
|
||||||
registry:2
|
registry:2
|
||||||
3
test/Dockerfile
Normal file
3
test/Dockerfile
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
FROM ubuntu:latest
|
||||||
|
|
||||||
|
CMD ["echo", "Hello, World!"]
|
||||||
Loading…
Add table
Add a link
Reference in a new issue