docker + gitlab
https://hub.docker.com/r/gitlab/gitlab-ce
docker run --name gitlab -d -p 4433:443 -p 8000:80 -p 2222:22 --rm \
-v ~/gitlab/config:/etc/gitlab \
-v ~/gitlab/logs:/var/log/gitlab \
-v ~/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ce
server {
listen 80;
server_name ssh.adsryen.cn;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
server_name ssh.adsryen.cn;
ssl on;
ssl_certificate /etc/letsencrypt/live/adsryen.cn/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/adsryen.cn/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
location / {
proxy_pass http://172.16.166.99:2222;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
server {
listen 80;
server_name git.adsryen.cn;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
server_name git.adsryen.cn;
ssl on;
ssl_certificate /etc/letsencrypt/live/adsryen.cn/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/adsryen.cn/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
location / {
proxy_pass http://172.16.166.99:8000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
https://git.adsryen.cn/
最后更新于