Compare commits

...

3 Commits

Author SHA1 Message Date
Prod
7adf8f3daf works 2024-08-24 22:23:19 +00:00
Qwerty
b2e892a6a6 fix 2024-08-25 00:55:19 +03:00
Qwerty
6c89025327 ssl 2024-08-25 00:48:25 +03:00
4 changed files with 33 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
certs/

View File

@ -5,6 +5,21 @@ services:
container_name: nginx-reverse-proxy
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./certs:/etc/letsencrypt
- ./html:/var/www/html
restart: always
certbot:
image: certbot/certbot
container_name: certbot
volumes:
- ./certs:/etc/letsencrypt
- ./html:/var/www/html
# command: certonly --webroot --webroot-path=/var/www/html --email prbigoon@gmail.com --agree-tos --no-eff-email -d git.evil-bird.ru
command: renew --webroot --webroot-path=/var/www/html
entrypoint: /bin/sh -c "trap exit TERM; while :; do certbot renew --webroot --webroot-path=/var/www/html; sleep 12h & wait $${!}; done;"
depends_on:
- nginx

1
html/index.html Normal file
View File

@ -0,0 +1 @@
<html><body><h1>Test Page</h1></body></html>

View File

@ -5,6 +5,22 @@ http {
listen 80;
server_name git.evil-bird.ru;
location /.well-known/acme-challenge/ {
root /var/www/html;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
server_name git.evil-bird.ru;
ssl_certificate /etc/letsencrypt/live/git.evil-bird.ru/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/git.evil-bird.ru/privkey.pem;
location / {
proxy_pass http://10.10.1.10:3000;
proxy_set_header Host $host;