Deploy docker-compose-nginx-nossl.yaml to prod
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
FROM borigas/letsencrypt-reverse-proxy
|
||||
RUN echo '' > /etc/nginx/sites-available/default
|
||||
COPY nginx-sites /etc/nginx/sites-available
|
||||
@@ -0,0 +1,34 @@
|
||||
# https://hub.docker.com/_/nextcloud/?tab=description&page=1&ordering=last_updated
|
||||
version: '3.8'
|
||||
|
||||
volumes:
|
||||
nextcloud_data:
|
||||
nextcloud_mysql:
|
||||
|
||||
services:
|
||||
nextcloud_db:
|
||||
image: mariadb
|
||||
restart: always
|
||||
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb_read_only_compressed=OFF
|
||||
volumes:
|
||||
- nextcloud_mysql:/var/lib/mysql
|
||||
environment:
|
||||
- MARIADB_ROOT_PASSWORD=1234
|
||||
- MARIADB_PASSWORD=1234
|
||||
- MARIADB_DATABASE=nextcloud
|
||||
- MARIADB_USER=nextcloud
|
||||
|
||||
nextcloud:
|
||||
image: nextcloud
|
||||
restart: always
|
||||
ports:
|
||||
- "8080:80"
|
||||
links:
|
||||
- nextcloud_db
|
||||
volumes:
|
||||
- nextcloud_data:/var/www/html
|
||||
environment:
|
||||
- MYSQL_PASSWORD=1234
|
||||
- MYSQL_DATABASE=nextcloud
|
||||
- MYSQL_USER=nextcloud
|
||||
- MYSQL_HOST=nextcloud_db
|
||||
@@ -0,0 +1,19 @@
|
||||
version: "3.8"
|
||||
services:
|
||||
nginx:
|
||||
build:
|
||||
context: nginx
|
||||
dockerfile: Dockerfile-nginx-nossl
|
||||
# image: nginx
|
||||
# environment:
|
||||
# LETSENCRYPT_EMAIL: "rudolfss13@gmail.com"
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
# volumes:
|
||||
# - "nginx_letsencrypt:/etc/letsencrypt"
|
||||
# - "nginx_sites:/etc/nginx/sites-available"
|
||||
|
||||
#volumes:
|
||||
# nginx_letsencrypt: { }
|
||||
# nginx_sites: { }
|
||||
@@ -0,0 +1,43 @@
|
||||
version: "3.8"
|
||||
services:
|
||||
nginx-proxy:
|
||||
image: jwilder/nginx-proxy
|
||||
container_name: nginx-proxy
|
||||
labels:
|
||||
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy"
|
||||
# такой лейбл позволит контейнеру с цертботом понять, какой из запущенных nginx - реверс-прокси.
|
||||
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
|
||||
|
||||
letsencrypt-companion:
|
||||
image: jrcs/letsencrypt-nginx-proxy-companion
|
||||
container_name: letsencrypt-companion
|
||||
volumes_from:
|
||||
- nginx-proxy
|
||||
volumes:
|
||||
- /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: { }
|
||||
@@ -0,0 +1,45 @@
|
||||
user nobody nogroup;
|
||||
worker_processes 1;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
|
||||
sendfile on;
|
||||
|
||||
#keepalive_timeout 0;
|
||||
keepalive_timeout 65;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name sync.rudolf.com.ua;
|
||||
location / {
|
||||
proxy_pass http://192.168.17.5:8384;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
client_max_body_size 100m;
|
||||
server_name rudolf.com.ua;
|
||||
location / {
|
||||
proxy_pass http://192.168.17.5:3000;
|
||||
}
|
||||
}
|
||||
server {
|
||||
listen 80;
|
||||
server_name omw.rudolf.com.ua;
|
||||
location / {
|
||||
proxy_pass http://192.168.17.5:80;
|
||||
}
|
||||
}
|
||||
server {
|
||||
listen 80;
|
||||
location / {
|
||||
proxy_pass http://192.168.17.1:1080;
|
||||
}
|
||||
}
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
user nobody nogroup;
|
||||
worker_processes 1;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
|
||||
sendfile on;
|
||||
|
||||
#keepalive_timeout 0;
|
||||
keepalive_timeout 65;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name sync.rudolf.com.ua;
|
||||
location / {
|
||||
proxy_pass http://192.168.17.5:8384;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
client_max_body_size 100m;
|
||||
server_name rudolf.com.ua;
|
||||
location / {
|
||||
proxy_pass http://192.168.17.5:3000;
|
||||
}
|
||||
}
|
||||
server {
|
||||
listen 80;
|
||||
server_name omw.rudolf.com.ua;
|
||||
location / {
|
||||
proxy_pass http://192.168.17.5:80;
|
||||
}
|
||||
}
|
||||
server {
|
||||
listen 80;
|
||||
location / {
|
||||
proxy_pass http://192.168.17.1:1080;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
FROM nginx
|
||||
#RUN echo '' > /etc/nginx/conf.d/default.conf
|
||||
COPY sites /etc/nginx/conf.d
|
||||
@@ -0,0 +1,18 @@
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
#
|
||||
# server {
|
||||
# listen 80;
|
||||
# listen [::]:80;
|
||||
# server_name localhost;
|
||||
#
|
||||
# error_page 500 502 503 504 /50x.html;
|
||||
# location = /50x.html {
|
||||
# root /usr/share/nginx/html;
|
||||
# }
|
||||
#
|
||||
# }
|
||||
#
|
||||
@@ -0,0 +1,11 @@
|
||||
server {
|
||||
# listen 443 ssl;
|
||||
listen 80;
|
||||
client_max_body_size 100m;
|
||||
server_name rudolf.com.ua;
|
||||
location / {
|
||||
proxy_pass http://192.168.17.5:3000;
|
||||
}
|
||||
# ssl_certificate /etc/letsencrypt/live/rudolf.com.ua/fullchain.pem;
|
||||
# ssl_certificate_key /etc/letsencrypt/live/rudolf.com.ua/privkey.pem;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
server {
|
||||
# listen 443 ssl;
|
||||
listen 80;
|
||||
server_name omw.rudolf.com.ua;
|
||||
location / {
|
||||
proxy_pass http://192.168.17.5:81;
|
||||
}
|
||||
# ssl_certificate /etc/letsencrypt/live/omw.rudolf.com.ua/fullchain.pem;
|
||||
# ssl_certificate_key /etc/letsencrypt/live/omw.rudolf.com.ua/privkey.pem;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
server {
|
||||
# listen 443 ssl;
|
||||
listen 80;
|
||||
server_name smarthome.rudolf.com.ua;
|
||||
location / {
|
||||
proxy_pass http://192.168.17.5:8082;
|
||||
}
|
||||
location /rest/ws {
|
||||
proxy_pass http://192.168.17.5:8082/rest/ws;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
# ssl_certificate /etc/letsencrypt/live/smarthome.rudolf.com.ua/fullchain.pem;
|
||||
# ssl_certificate_key /etc/letsencrypt/live/smarthome.rudolf.com.ua/privkey.pem;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
server {
|
||||
# listen 443 ssl;
|
||||
listen 80;
|
||||
server_name sync.rudolf.com.ua;
|
||||
location / {
|
||||
proxy_pass http://192.168.17.5:8384;
|
||||
}
|
||||
# ssl_certificate /etc/letsencrypt/live/sync.rudolf.com.ua/fullchain.pem;
|
||||
# ssl_certificate_key /etc/letsencrypt/live/sync.rudolf.com.ua/privkey.pem;
|
||||
}
|
||||
Reference in New Issue
Block a user