[Look for a tester] ansible role added #662
mhkarimi1383/master into master
@ -0,0 +1 @@ |
|||
roles/nginx/files/ssl/* |
|||
@ -0,0 +1,31 @@ |
|||
# Ansible Playbook to install uptime kuma using docker |
|||
|
|||
This playbook comes with three roles |
|||
|
|||
1. docker (to install docker) |
|||
2. nginx (to install nginx using docker with ssl) |
|||
3. uptime kuma (to install uptime kuma using docker) |
|||
|
|||
To see more info see docker-compose, tasks and config files |
|||
I will try to make this readme better |
|||
|
|||
## To run it |
|||
1. install ansible see [here](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) |
|||
2. run `ansible-galaxy install -r ansible-requirements.yml` to get requirements |
|||
3. prepare inventory hosts |
|||
4. put your certificates in files section in nginx role with this structure below: |
|||
``` |
|||
ansible -> roles -> nginx -> ssl -> <uptime kuma domain>.fullchain.pem |
|||
ansible -> roles -> nginx -> ssl -> <uptime kuma domain>.privkey.pem |
|||
``` |
|||
5. to run playbook |
|||
```bash |
|||
ansible-playbook ./playbook.yml -i <your inventory path> -e "kuma_domain=<uptime kuma domain>" -e "kuma_image_os=<alpine or debian>" -e "kuma_image_version=<version>" |
|||
``` |
|||
you can use other ansible playbook options too |
|||
|
|||
> Note: Replace `<uptime kuma domain>` with your desired domain for uptime kuma |
|||
> replace `<version>` with a version from https://github.com/louislam/uptime-kuma/releases |
|||
> replace `<alpine or debian>` with one of options |
|||
> `-e "kuma_image_os=<alpine or debian>" -e "kuma_image_version=<version>"` is not required and you can remove this part or change only one of them (kuma_image_os is debian & kuma_image_version is 1 by default) |
|||
> If you are not using root user as your ansible_user use -bK option to become root |
|||
@ -0,0 +1,6 @@ |
|||
roles: |
|||
- src: geerlingguy.docker |
|||
- src: geerlingguy.pip |
|||
|
|||
collections: |
|||
- name: community.docker |
|||
@ -0,0 +1,14 @@ |
|||
- name: install uptime kuma with nginx connected |
|||
hosts: all |
|||
|
|||
vars: |
|||
pip_install_packages: |
|||
- name: docker |
|||
docker_compose_version: "v2.0.1" |
|||
|
|
|||
|
|||
roles: |
|||
- {role: geerlingguy.docker, tags: ["docker"]} |
|||
- {role: geerlingguy.pip, tags: ["docker"]} |
|||
- {role: kuma, tags: ["kuma"]} |
|||
- {role: nginx, tags: ["nginx"]} |
|||
|
|||
@ -0,0 +1,22 @@ |
|||
- name: Ensure Volumes & Files directories exists |
|||
file: |
|||
dest: "{{item}}" |
|||
state: directory |
|||
loop: |
|||
- /compose |
|||
- /compose/volumes |
|||
- /compose/volumes/nginx |
|||
- /compose/volumes/nginx/log/{{ kuma_domain }} |
|||
|
|||
- name: Ensure nginx config directory exist |
|||
copy: |
|||
src: ssl |
|||
dest: /compose/volumes/nginx/ssl |
|||
mode: 'preserve' |
|||
group: root |
|||
owner: root |
|||
|
|||
- name: Ensure config files are updated |
|||
template: |
|||
src: "nginx.conf" |
|||
dest: /compose/volumes/nginx/nginx.conf |
|||
@ -0,0 +1,88 @@ |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
user nginx; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
worker_processes auto; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
|
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
pid /var/run/nginx.pid; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
error_log /var/log/nginx/error.log; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
|
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
events { |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
worker_connections 2048; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
} |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
|
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
http { |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
sendfile on; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
tcp_nopush on; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
tcp_nodelay on; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
keepalive_timeout 65; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
types_hash_max_size 2048; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
server_tokens off; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
|
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
default_type application/octet-stream; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
|
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
### SSL Settings for all servers (https://ssl-config.mozilla.org/#server=nginx&server-version=1.17.2&config=intermediate) |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
# certs sent to the client in SERVER HELLO are concatenated in ssl_certificate |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
ssl_certificate /etc/nginx/ssl/{{ kuma_domain }}.fullchain.pem; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
ssl_certificate_key /etc/nginx/ssl/{{ kuma_domain }}.privkey.pem; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
ssl_session_timeout 1d; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
ssl_session_cache shared:MozSSL:10m; # about 40000 sessions |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
ssl_session_tickets off; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
|
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
# intermediate configuration |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
ssl_protocols TLSv1.2 TLSv1.3; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
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; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
ssl_prefer_server_ciphers off; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
|
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
# curl https://ssl-config.mozilla.org/ffdhe2048.txt > /etc/nginx/ssl/dhparam.pem (TODO: check if it's secure to use others DH parameters!) |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
# openssl dhparam -out /etc/nginx/ssl/dhparam.pem 4096 |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
ssl_dhparam /etc/nginx/ssl/dhparam.pem; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
|
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
# HSTS (ngx_http_headers_module is required) (63072000 seconds) |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
add_header Strict-Transport-Security "max-age=63072000" always; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
|
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
# OCSP stapling |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
ssl_stapling on; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
ssl_stapling_verify on; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
|
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
log_format main '$remote_addr - $remote_user [$time_local] "$request_method $scheme://$host$request_uri $server_protocol" $status $body_bytes_sent ' |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
'"$http_referer" "$http_user_agent" $request_time $upstream_response_time UPA:$upstream_addr BYS:$bytes_sent BYR:$request_length'; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
access_log /var/log/nginx/access.log main; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
|
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
### Set additional headers to be send to upstream |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
proxy_set_header Host $http_host; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
proxy_set_header X-Real-IP $remote_addr; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
proxy_set_header X-Forwarded-Proto $scheme; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
|
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
# Remove Headers that gonna be sent to client |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
proxy_hide_header X-Powered-By; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
proxy_hide_header Server; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
|
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
# Redirect HTTP request to HTTPS |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
server { |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
listen 80 default_server; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
server_name {{ kuma_domain }}; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
return 302 https://$host$request_uri; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
} |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
|
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
server { |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
server_name {{ kuma_domain }}; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
listen 443 ssl http2 default_server; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
|
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
access_log /var/log/nginx/{{ kuma_domain }}.access.log main; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
error_log /var/log/nginx/{{ kuma_domain }}.error.log; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
|
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
location / { |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
# rewrite ^/(.*)/$ /$1 permanent; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
### redirect urls with trailing slash to non-trailing slash |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
# https://serverfault.dev/questions/597302/removing-the-trailing-slash-from-a-url-with-nginx |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
# location ~ (?<no_slash>.+)/$ { |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
# return 302 https://$host$no_slash; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
# } |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
proxy_set_header X-Real-IP $remote_addr; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
proxy_pass http://uptime-kuma:3001/; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
proxy_http_version 1.1; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
proxy_set_header Upgrade $http_upgrade; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
proxy_set_header Connection "upgrade"; |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
} |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
} |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
} |
|||
|
Review
You can generate initial self-signed certs using Ansible Openssl module: Ex:
Review
This should be: Since the service gets a hostname assigned by Docker Network.
Review
Suggest creating a folder:
Which will contain: That way you have less custom stuff in the nginx.conf |
|||
@ -0,0 +1,3 @@ |
|||
--- |
|||
kuma_image_version: '1' |
|||
kuma_image_os: 'debian' |
|||
@ -0,0 +1,23 @@ |
|||
- name: Ensure Volumes & Files directories exists |
|||
file: |
|||
dest: "{{item}}" |
|||
state: directory |
|||
loop: |
|||
- /compose |
|||
- /compose/kuma |
|||
- /compose/volumes |
|||
- /compose/volumes/kuma |
|||
|
|||
- name: Ensure docker-compose file has been updated |
|||
template: |
|||
src: "{{item}}" |
|||
dest: /compose/kuma/ |
|||
loop: |
|||
- docker-compose.yml |
|||
|
|||
- name: Ensure uptime-kuma is up |
|||
community.docker.docker_compose: |
|||
state: present |
|||
project_src: /compose/kuma |
|||
pull: yes |
|||
|
|||
@ -0,0 +1,29 @@ |
|||
|
Review
Replace with
Review
Replace with
Review
Review
Review
This should point to
Review
This should point to
Review
Still valid comment
Review
Still valid comment
Review
There's not need to use
Review
There's not need to use
|
|||
version: '3.3' |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
services: |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
uptime-kuma: |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
Review
This whole compose file should be merge with the NGINX one. No need to run 2 compose instances if NGINX is only managing traffic for |
|||
restart: always |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
networks: |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
- uptime-kuma |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
expose: |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
- 3001 |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
volumes: |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
- '/compose/volumes/uptime-kuma:/app/data' |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
container_name: uptime-kuma |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
image: 'louislam/uptime-kuma:{{kuma_image_version}}-{{kuma_image_os}}' |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
|
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
nginx: |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
ports: |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
- 443:443 |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
- 80:80 |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
networks: |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
- uptime-kuma |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
depends_on: |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
- uptime-kuma |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
restart: always |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
image: nginx:stable-alpine |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
volumes: |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
- '/compose/volumes/nginx/:/etc/nginx/' |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
- '/compose/volumes/nginx/log/{{ kuma_domain }}:/var/log/nginx/{{ kuma_domain }}/' |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
|
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
networks: |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
uptime-kuma: |
|||
|
Review
Replace with
Review
Review
This should point to
Review
Still valid comment
Review
There's not need to use
|
|||
docker-compose 2.0.1 is not installable via PIP. They migrated from Python to Golang for v2.x.x