Compare commits
5 Commits
cab6ab2d8e
...
dockerbox_
Author | SHA1 | Date | |
---|---|---|---|
03f0b41ae6 | |||
c67a39982e
|
|||
f68f57d0cf
|
|||
b9f9b0bf3c
|
|||
4f4a341b05
|
10
.gitignore
vendored
10
.gitignore
vendored
@@ -1,13 +1,3 @@
|
||||
.vagrant
|
||||
.playbook
|
||||
/*.yml
|
||||
/*.yaml
|
||||
!backup.yml
|
||||
!moxie.yml
|
||||
!docker.yml
|
||||
!dockerbox.yml
|
||||
!hypervisor.yml
|
||||
!minecraft.yml
|
||||
!proxy.yml
|
||||
!unifi.yml
|
||||
/environments/
|
||||
|
@@ -8,7 +8,6 @@
|
||||
- docker
|
||||
- traefik
|
||||
- nextcloud
|
||||
- gitea
|
||||
- jenkins
|
||||
- prometheus
|
||||
- nginx
|
||||
|
@@ -1,17 +1,3 @@
|
||||
# Copyright (C) 2020 Kris Lamoureux
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, version 3 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
- name: Install Docker Box Server
|
||||
hosts: dockerhosts
|
||||
become: true
|
||||
|
@@ -1,5 +1,5 @@
|
||||
- name: Reboot host
|
||||
reboot:
|
||||
ansible.builtin.reboot:
|
||||
msg: "Reboot initiated by Ansible"
|
||||
connect_timeout: 5
|
||||
listen: reboot_host
|
||||
|
@@ -5,7 +5,7 @@ gitea_webport: "3000"
|
||||
gitea_ssh: "127.0.0.1:{{ gitea_sshport }}"
|
||||
gitea_web: "127.0.0.1:{{ gitea_webport }}"
|
||||
gitea_volume: "{{ gitea_name }}"
|
||||
gitea_rooturl: "http://{{ gitea_domain }}"
|
||||
gitea_rooturl: "https://{{ gitea_domain }}"
|
||||
gitea_signup: true
|
||||
|
||||
# database settings
|
||||
|
@@ -10,6 +10,11 @@
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
- name: Generate DH Parameters
|
||||
openssl_dhparam:
|
||||
path: /etc/ssl/dhparams.pem
|
||||
size: 4096
|
||||
|
||||
- name: Install nginx base configuration
|
||||
template:
|
||||
src: nginx.conf.j2
|
||||
|
@@ -21,6 +21,14 @@ http {
|
||||
keepalive_timeout 65;
|
||||
server_names_hash_bucket_size 128;
|
||||
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
|
||||
ssl_prefer_server_ciphers off;
|
||||
ssl_dhparam /etc/ssl/dhparams.pem;
|
||||
ssl_session_cache shared:SSL:10m;
|
||||
ssl_session_timeout 1d;
|
||||
ssl_session_tickets off;
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
}
|
||||
|
@@ -1,12 +1,13 @@
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
server_name {{ item.domain }};
|
||||
return 301 https://{{ item.domain }}$request_uri;
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name {{ item.domain }};
|
||||
return 301 https://{{ item.domain }}$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name {{ item.domain }};
|
||||
access_log /var/log/nginx/{{ item.domain }}.log main;
|
||||
{% if proxy.production is defined and proxy.production and proxy.dns_cloudflare.wildcard_domains is defined and item.tls.cert is not defined %}
|
||||
@@ -26,6 +27,12 @@ server {
|
||||
{% else %}
|
||||
ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
|
||||
ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
|
||||
{% endif %}
|
||||
{% if item.hsts is defined %}
|
||||
add_header Strict-Transport-Security "max-age={{ item.hsts }}" always;
|
||||
{% endif %}
|
||||
{% if item.client_max_body_size is defined %}
|
||||
client_max_body_size {{ item.client_max_body_size }};
|
||||
{% endif %}
|
||||
location / {
|
||||
{% if item.restrict is defined and item.restrict %}
|
||||
@@ -39,6 +46,12 @@ server {
|
||||
proxy_pass {{ item.proxy_pass }};
|
||||
{% if item.proxy_ssl_verify is defined and item.proxy_ssl_verify is false %}
|
||||
proxy_ssl_verify off;
|
||||
{% endif %}
|
||||
{% if item.websockets is defined and item.websockets %}
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_set_header Origin http://$host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
{% endif %}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user