websites: dustin.hatch.name: Deploy new site
Promoting the new site I have been working on at *dustin.hatch.is* to my main domain, *dustin.hatch.name*. The new site is just static content, generated and uploaded by a Jenkins job. Finally have a certificate for *dustin.hatch.name* now, too!collectd-buildroot
parent
3c8e576841
commit
d363026db2
2
.certs
2
.certs
|
@ -1 +1 @@
|
||||||
Subproject commit 654b52b6080c1a54b6466ac9cdc00da8d2c910d9
|
Subproject commit 13f97e4fa1468623cde4cb9e91d616d8ecc57225
|
|
@ -0,0 +1 @@
|
||||||
|
../../.certs/acme.sh/dustin.hatch.name/fullchain.cer
|
|
@ -0,0 +1 @@
|
||||||
|
../../.certs/acme.sh/dustin.hatch.name/dustin.hatch.name.key
|
|
@ -0,0 +1 @@
|
||||||
|
dchwww_publisher_keys: []
|
|
@ -1,20 +1,25 @@
|
||||||
# vim: set ft=apache :
|
# vim: set ft=apache :
|
||||||
|
|
||||||
WSGIDaemonProcess dchwww \
|
<VirtualHost _default_:80>
|
||||||
user=webapp.dchwww \
|
|
||||||
group=webapp.dchwww \
|
|
||||||
python-home=/srv/www/dustin.hatch.name/venv \
|
|
||||||
display-name=%{GROUP}
|
|
||||||
|
|
||||||
|
|
||||||
<VirtualHost *:80>
|
|
||||||
ServerName dustin.hatch.name
|
ServerName dustin.hatch.name
|
||||||
|
|
||||||
WSGIScriptAlias / /srv/www/dustin.hatch.name/site.py \
|
RewriteEngine On
|
||||||
process-group=dchwww
|
RewriteRule (.*) https://%{SERVER_NAME}$1 [R=301,L]
|
||||||
Alias /static /srv/www/dustin.hatch.name/static
|
</VirtualHost>
|
||||||
|
|
||||||
<Location />
|
<VirtualHost _default_:443>
|
||||||
Require all granted
|
ServerName dustin.hatch.name
|
||||||
</Location>
|
|
||||||
|
Include conf.d/ssl.include
|
||||||
|
SSLCertificateKeyFile /etc/pki/tls/private/dustin.hatch.name.key
|
||||||
|
SSLCertificateFile /etc/pki/tls/certs/dustin.hatch.name.cer
|
||||||
|
|
||||||
|
<IfModule mod_headers.c>
|
||||||
|
Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains"
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
DocumentRoot /srv/www/dustin.hatch.name/htdocs
|
||||||
|
<Directory /srv/www/dustin.hatch.name/htdocs>
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
- name: restart httpd
|
|
||||||
service:
|
|
||||||
name=httpd
|
|
||||||
state=restarted
|
|
||||||
- name: reload httpd
|
- name: reload httpd
|
||||||
service:
|
service:
|
||||||
name=httpd
|
name: httpd
|
||||||
state=reloaded
|
state: reloaded
|
||||||
|
|
|
@ -1,36 +1,36 @@
|
||||||
- name: ensure mod_wsgi is installed
|
|
||||||
package:
|
|
||||||
name=python3-mod_wsgi
|
|
||||||
state=present
|
|
||||||
notify: restart httpd
|
|
||||||
tags:
|
|
||||||
- install
|
|
||||||
|
|
||||||
- name: ensure rsync is installed
|
- name: ensure rsync is installed
|
||||||
package:
|
package:
|
||||||
name=rsync
|
name: rsync
|
||||||
state=present
|
state: present
|
||||||
tags:
|
tags:
|
||||||
- install
|
- install
|
||||||
|
|
||||||
- name: ensure app group exists
|
- name: ensure app group exists
|
||||||
group:
|
group:
|
||||||
name=webapp.dchwww
|
name: webapp.dchwww
|
||||||
state=present
|
state: present
|
||||||
- name: ensure app user exists
|
- name: ensure app user exists
|
||||||
user:
|
user:
|
||||||
name=webapp.dchwww
|
name: webapp.dchwww
|
||||||
group=webapp.dchwww
|
group: webapp.dchwww
|
||||||
home=/srv/www/dustin.hatch.name
|
home: /srv/www/dustin.hatch.name
|
||||||
createhome=yes
|
createhome: true
|
||||||
state=present
|
state: present
|
||||||
|
|
||||||
- name: ensure app home directory permissions are set
|
- name: ensure app home directory permissions are set
|
||||||
file:
|
file:
|
||||||
path=/srv/www/dustin.hatch.name
|
path: /srv/www/dustin.hatch.name
|
||||||
mode=0755
|
mode: u=rwx,go=rx
|
||||||
state=directory
|
state: directory
|
||||||
|
|
||||||
|
- name: ensure app ssh home directory exists
|
||||||
|
file:
|
||||||
|
path: /srv/www/dustin.hatch.name/.ssh
|
||||||
|
mode: '0700'
|
||||||
|
owner: webapp.dchwww
|
||||||
|
group: webapp.dchwww
|
||||||
|
setype: ssh_home_t
|
||||||
|
state: directory
|
||||||
- name: ensure publisher keys are trusted
|
- name: ensure publisher keys are trusted
|
||||||
authorized_key:
|
authorized_key:
|
||||||
key: "{{ dchwww_publisher_keys|join('\n') }}"
|
key: "{{ dchwww_publisher_keys|join('\n') }}"
|
||||||
|
@ -39,22 +39,16 @@
|
||||||
- name: ensure authorized_keys file permissions are correct
|
- name: ensure authorized_keys file permissions are correct
|
||||||
file:
|
file:
|
||||||
path: /srv/www/dustin.hatch.name/.ssh/authorized_keys
|
path: /srv/www/dustin.hatch.name/.ssh/authorized_keys
|
||||||
mode: '0600'
|
mode: u=rw,go=
|
||||||
owner: webapp.dchwww
|
owner: webapp.dchwww
|
||||||
group: webapp.dchwww
|
group: webapp.dchwww
|
||||||
setype: ssh_home_t
|
setype: ssh_home_t
|
||||||
|
|
||||||
- name: ensure virtualenv exists
|
|
||||||
become: true
|
|
||||||
become_user: webapp.dchwww
|
|
||||||
pip:
|
|
||||||
name: pip
|
|
||||||
virtualenv: /srv/www/dustin.hatch.name/venv
|
|
||||||
virtualenv_command: /usr/bin/python3 -m venv
|
|
||||||
|
|
||||||
- name: ensure apache is configured to serve dustin.hatch.name
|
- name: ensure apache is configured to serve dustin.hatch.name
|
||||||
copy:
|
copy:
|
||||||
src=dustin.hatch.name.httpd.conf
|
src: dustin.hatch.name.httpd.conf
|
||||||
dest=/etc/httpd/conf.d/dustin.hatch.name.conf
|
dest: /etc/httpd/conf.d/dustin.hatch.name.conf
|
||||||
mode=0644
|
mode: u=rw,go=r
|
||||||
notify: reload httpd
|
notify: reload httpd
|
||||||
|
tags:
|
||||||
|
- httpd-config
|
||||||
|
|
|
@ -7,6 +7,12 @@
|
||||||
tags: formsubmit
|
tags: formsubmit
|
||||||
- role: websites/pyrocufflink.net
|
- role: websites/pyrocufflink.net
|
||||||
tags: websites/pyrocufflink.net
|
tags: websites/pyrocufflink.net
|
||||||
|
- role: cert
|
||||||
|
cert_src: websites/dustin.hatch.name.cer
|
||||||
|
cert_dest: /etc/pki/tls/certs/dustin.hatch.name.cer
|
||||||
|
cert_key_src: websites/dustin.hatch.name.key
|
||||||
|
cert_key_dest: /etc/pki/tls/private/dustin.hatch.name.key
|
||||||
|
tags: websites/dustin.hatch.name
|
||||||
- role: websites/dustin.hatch.name
|
- role: websites/dustin.hatch.name
|
||||||
tags: websites/dustin.hatch.name
|
tags: websites/dustin.hatch.name
|
||||||
- role: websites/ebonfire.com
|
- role: websites/ebonfire.com
|
||||||
|
|
Loading…
Reference in New Issue