mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-14 16:55:00 +01:00
setup
This commit is contained in:
parent
922056b63c
commit
58b33d6fd1
5 changed files with 40 additions and 13 deletions
|
|
@ -6,10 +6,8 @@ http {
|
|||
server {
|
||||
listen 80;
|
||||
|
||||
location / {
|
||||
return 200 'Hell, World!';
|
||||
add_header Content-Type text/plain;
|
||||
}
|
||||
server_name nilstrieb.dev;
|
||||
return 302 http://blog.nilstrieb.dev$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
|
|
@ -18,7 +16,8 @@ http {
|
|||
server_name registry.nilstrieb.dev;
|
||||
|
||||
location / {
|
||||
proxy_pass http://registry:5000/;
|
||||
return 404 'No registry here...';
|
||||
#proxy_pass http://registry:5000/;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
16
nginx/run.sh
16
nginx/run.sh
|
|
@ -1,6 +1,14 @@
|
|||
#!/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
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
|
||||
if docker inspect nginx > /dev/null 2>&1 ;
|
||||
then
|
||||
echo "Registry container exists already..."
|
||||
else
|
||||
docker run -d -p 8080:80 --restart=always --name nginx \
|
||||
-v "$SCRIPT_DIR/nginx.conf:/etc/nginx/nginx.conf:ro" \
|
||||
--net internal \
|
||||
nginx:latest
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue