Implement docker compose app deployment playbook

This commit is contained in:
2020-12-08 22:21:03 -05:00
parent 1990413fbe
commit 0016b318e2
6 changed files with 392 additions and 11 deletions

View File

@@ -0,0 +1,31 @@
# Ansible managed file
# DO NOT MANUALLY EDIT
#
server {
server_name {{ omni_compose_apps.bitwarden.published.host }};
listen 443 ssl;
root /usr/share/nginx/html;
location / {
proxy_pass http://localhost:{{ omni_compose_apps.bitwarden.published.8080 }}/;
proxy_set_header Host $host;
}
ssl_certificate /etc/letsencrypt/live/{{ omni_compose_apps.bitwarden.published.host }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ omni_compose_apps.bitwarden.published.host }}/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}
server {
server_name {{ omni_compose_apps.bitwarden.published.host }};
listen 80;
root /usr/share/nginx/html;
if ($host = {{ omni_compose_apps.bitwarden.published.host }}) {
return 301 https://$host$request_uri;
}
return 404;
}
#
# EOF

View File

@@ -0,0 +1,37 @@
# Ansible managed file
# DO NOT MANUALLY EDIT
#
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;
events {
worker_connections 1024;
}
http {
log_format main '$time_local $remote_addr[$status] - $remote_addr($remote_user) - $body_bytes_sent - "$request" "$http_referer" "$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;
}
#
# EOF