Nextcloud with ssl

This commit is contained in:
2023-11-03 01:12:38 +01:00
parent b515cc53f0
commit 95a5d48a9a
6 changed files with 85 additions and 54 deletions
+10 -1
View File
@@ -7,4 +7,13 @@ docker context create ruVdsina --docker "host=ssh://root@v1320012.hosted-by-vdsi
docker context use ruVdsina
docker-compose -c ruVdsina -f /media/DATA/src/ansible/docker-compose-gogs.yaml up -d
docker-compose -c ruVdsina -f /media/DATA/src/ansible/docker-compose-nginx-nossl.yaml up -d --build
docker-compose -c ruVdsina -f /media/DATA/src/ansible/docker-compose-nginx.yaml up -d --build
docker container run --rm -it \
-v nextcloud_nextcloud_mysql:/from \
-v st_nextcloud_nextcloud_mysql:/to \
alpine ash -c "cd /to; rm -r *;cd /from ; cp -av . /to"
ip host nextcloud.rudolf.keenetic.link 192.168.1.96
no ip host nextcloud.rudolf.keenetic.link 192.168.1.96
system configuration save
+19 -14
View File
@@ -1,20 +1,25 @@
version: "3.8"
#https://github.com/nginx-proxy/nginx-proxy
#https://github.com/nginx-proxy/acme-companion:
networks:
nextcloud_default:
external: true
volumes:
certs:
acme:
vhost.d:
html:
services:
nginx:
build:
context: nginx
dockerfile: Dockerfile-nginx-nossl
# image: nginx
# environment:
# LETSENCRYPT_EMAIL: "rudolfss13@gmail.com"
image: nginxproxy/nginx-proxy
ports:
- "80:80"
- "443:443"
# volumes:
# - "nginx_letsencrypt:/etc/letsencrypt"
# - "nginx_sites:/etc/nginx/sites-available"
#volumes:
# nginx_letsencrypt: { }
# nginx_sites: { }
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
- nextcloud_default
+12
View File
@@ -0,0 +1,12 @@
version: "3.8"
#https://github.com/nginx-proxy/nginx-proxy
#https://github.com/nginx-proxy/acme-companion:
services:
nginx_test:
image: nginx
environment:
- VIRTUAL_HOST=test.rudolf.keenetic.link
- LETSENCRYPT_HOST=test.rudolf.keenetic.link
- LETSENCRYPT_TEST=true
+39 -32
View File
@@ -1,43 +1,50 @@
version: "3.8"
#https://github.com/nginx-proxy/nginx-proxy
#https://github.com/nginx-proxy/acme-companion:
networks:
nextcloud_default:
external: true
proxy-tier:
volumes:
certs:
conf:
acme:
vhost.d:
html:
services:
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
labels:
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy"
# такой лейбл позволит контейнеру с цертботом понять, какой из запущенных nginx - реверс-прокси.
nginx:
image: nginxproxy/nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./certs:/etc/nginx/certs:ro
- ./vhost.d:/etc/nginx/vhost.d:ro
- /usr/share/nginx/html
- conf:/etc/nginx/conf.d
- certs:/etc/nginx/certs:ro
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
networks:
- nextcloud_default
- proxy-tier
letsencrypt-companion:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: letsencrypt-companion
nginx_acme:
image: nginxproxy/acme-companion
volumes_from:
- nginx-proxy
- "nginx"
volumes:
- conf:/etc/nginx/conf.d
- certs:/etc/nginx/certs
- acme:/etc/acme.sh
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./certs:/etc/nginx/certs:rw
- ./vhost.d:/etc/nginx/vhost.d:rw
# nginx:
# build:
# context: .
# dockerfile: Dockerfile-nginx
## image: nginx
# environment:
# LETSENCRYPT_EMAIL: "rudolfss13@gmail.com"
# ports:
# - "81:80"
# - "443:443"
# volumes:
# - "nginx_letsencrypt:/etc/letsencrypt"
# - "nginx_sites:/etc/nginx/sites-available"
volumes:
nginx_letsencrypt: { }
nginx_sites: { }
environment:
- DEFAULT_EMAIL=rudolfss13@gmail.com
networks:
- proxy-tier
depends_on:
- nginx
+2 -6
View File
@@ -52,16 +52,12 @@ services:
- /media/DATA/runtime/nextcloud/data:/var/www/html/data
- /media/DATA:/var/DATA
environment:
- VIRTUAL_HOST=
- LETSENCRYPT_HOST=
- LETSENCRYPT_EMAIL=
- VIRTUAL_HOST=nextcloud.rudolf.keenetic.link
- LETSENCRYPT_HOST=nextcloud.rudolf.keenetic.link
ports:
- 8080:80
- 80:80
depends_on:
- app
networks:
- default
cron:
image: nextcloud:fpm-alpine
+3 -1
View File
@@ -45,7 +45,9 @@ http {
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
# set max upload size
client_max_body_size 512M;
client_max_body_size 15G;
proxy_request_buffering off;
fastcgi_buffers 64 4K;
# Enable gzip but do not remove ETag headers