From b6596e38c06c85d7698db52c6a8cbfa3420289f5 Mon Sep 17 00:00:00 2001 From: lusrmgr <96838367+lusrmgr@users.noreply.github.com> Date: Thu, 13 Oct 2022 17:29:24 -0500 Subject: [PATCH] Changes for me --- docker-compose.yml | 32 +++--------------------------- nginx/mysite.template | 46 ------------------------------------------- nginx/nginx.conf | 32 ------------------------------ prepare.sh | 5 ----- 4 files changed, 3 insertions(+), 112 deletions(-) delete mode 100644 nginx/mysite.template delete mode 100644 nginx/nginx.conf diff --git a/docker-compose.yml b/docker-compose.yml index 070a231..7711861 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -107,7 +107,7 @@ services: environment: PGDATA: /var/lib/postgresql/data/guacamole POSTGRES_DB: guacamole_db - POSTGRES_PASSWORD: 'ChooseYourOwnPasswordHere1234' + POSTGRES_PASSWORD: 'qjnEwAJEdqH3o6arPeTQ' POSTGRES_USER: guacamole_user image: postgres:13.4-buster networks: @@ -127,7 +127,7 @@ services: GUACD_HOSTNAME: guacd POSTGRES_DATABASE: guacamole_db POSTGRES_HOSTNAME: postgres - POSTGRES_PASSWORD: 'ChooseYourOwnPasswordHere1234' + POSTGRES_PASSWORD: 'qjnEwAJEdqH3o6arPeTQ' POSTGRES_USER: guacamole_user image: guacamole/guacamole links: @@ -135,31 +135,5 @@ services: networks: guacnetwork_compose: ports: -## enable next line if not using nginx -## - 8080:8080/tcp # Guacamole is on :8080/guacamole, not /. -## enable next line when using nginx - - 8080/tcp + - 8080:8080/tcp # Guacamole is on :8080/guacamole, not /. restart: always - -########### optional ############## - # nginx - nginx: - container_name: nginx_guacamole_compose - restart: always - image: nginx - volumes: - - ./nginx/ssl/self.cert:/etc/nginx/ssl/self.cert:ro - - ./nginx/ssl/self-ssl.key:/etc/nginx/ssl/self-ssl.key:ro - - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro - - ./nginx/mysite.template:/etc/nginx/conf.d/default.conf:ro - ports: - - 8443:443 - links: - - guacamole - networks: - guacnetwork_compose: - # run nginx - command: /bin/bash -c "nginx -g 'daemon off;'" -# nginx-debug-mode -# command: /bin/bash -c "nginx-debug -g 'daemon off;'" -#################################################################################### diff --git a/nginx/mysite.template b/nginx/mysite.template deleted file mode 100644 index 6c9fe45..0000000 --- a/nginx/mysite.template +++ /dev/null @@ -1,46 +0,0 @@ -### BBB -server { - listen 443 ssl http2; - server_name localhost; - - ssl_certificate /etc/nginx/ssl/self.cert; - ssl_certificate_key /etc/nginx/ssl/self-ssl.key; - - ssl_protocols TLSv1.2 TLSv1.3; - ssl_prefer_server_ciphers on; - ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"; - ssl_ecdh_curve secp384r1; - ssl_session_cache shared:SSL:10m; - ssl_session_tickets off; - ssl_stapling off; - ssl_stapling_verify off; -# resolver 8.8.8.8 8.8.4.4 valid=300s; -# resolver_timeout 5s; - - #charset koi8-r; - #access_log /var/log/nginx/host.access.log main; - - location / { - proxy_pass http://guacamole:8080/guacamole/; - proxy_buffering off; - proxy_http_version 1.1; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $http_connection; - proxy_cookie_path /guacamole/ /; - access_log off; - # allow large uploads (default=1m) - # 4096m = 4GByte - client_max_body_size 4096m; -} - - #error_page 404 /404.html; - - # redirect server error pages to the static page /50x.html - # - error_page 500 502 503 504 /50x.html; - location = /50x.html { - root /usr/share/nginx/html; - } - -} diff --git a/nginx/nginx.conf b/nginx/nginx.conf deleted file mode 100644 index d6320a6..0000000 --- a/nginx/nginx.conf +++ /dev/null @@ -1,32 +0,0 @@ -### AAA -user nginx; -worker_processes 1; - -error_log /var/log/nginx/error.log warn; -pid /var/run/nginx.pid; - - -events { - worker_connections 1024; -} - - -http { - include /etc/nginx/mime.types; - default_type application/octet-stream; - - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - - access_log /var/log/nginx/access.log main; - - sendfile on; - #tcp_nopush on; - - keepalive_timeout 65; - - #gzip on; - - include /etc/nginx/conf.d/*.conf; -} diff --git a/prepare.sh b/prepare.sh index 660cda2..37ab78f 100755 --- a/prepare.sh +++ b/prepare.sh @@ -8,11 +8,6 @@ then fi echo "Preparing folder init and creating ./init/initdb.sql" mkdir ./init >/dev/null 2>&1 -mkdir -p ./nginx/ssl >/dev/null 2>&1 chmod -R +x ./init docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --postgres > ./init/initdb.sql echo "done" -echo "Creating SSL certificates" -openssl req -nodes -newkey rsa:2048 -new -x509 -keyout nginx/ssl/self-ssl.key -out nginx/ssl/self.cert -subj '/C=DE/ST=BY/L=Hintertupfing/O=Dorfwirt/OU=Theke/CN=www.createyourown.domain/emailAddress=docker@createyourown.domain' -echo "You can use your own certificates by placing the private key in nginx/ssl/self-ssl.key and the cert in nginx/ssl/self.cert" -echo "done"