r/webites: Add apps.du5t1n.xyz F-Droid repo

I want to publish the _20125_ Status application to an F-Droid
repository to make it easy for Tabitha to install and update.  F-Droid
repositories are similar to other package repositories: a collection of
packages and some metadata files.  Although there is a fully-fledged
server-side software package that can manage F-Droid repositories, it's
not required: the metadata files can be pre-generated and then hosted by
a static web server just fine.

This commit adds configuration for the web server and reverse proxy to
host the F-Droid repository at _apps.du5t1n.xyz_.
dynamic-inventory
Dustin 2024-11-05 06:41:02 -06:00
parent 7e8aee072e
commit 168bfee911
9 changed files with 93 additions and 0 deletions

View File

@ -0,0 +1 @@
../../.certs/certificates/apps.du5t1n.xyz.crt

View File

@ -0,0 +1 @@
../../.certs/certificates/apps.du5t1n.xyz.key

View File

@ -36,6 +36,8 @@ dch_proxy_sites:
- backend: web - backend: web
match: ebonfire.com match: ebonfire.com
matcher: end matcher: end
- backend: web
match: apps.du5t1n.xyz
- backend: web - backend: web
match: hatchlearningcenter hlckc hlcks match: hatchlearningcenter hlckc hlcks
matcher: dom matcher: dom

View File

@ -9,6 +9,7 @@ ebonfire_publisher_keys: '{{ dchwww_publisher_keys }}'
nratonpass_publisher_keys: '{{ dchwww_publisher_keys }}' nratonpass_publisher_keys: '{{ dchwww_publisher_keys }}'
dcow_publisher_keys: '{{ dchwww_publisher_keys }}' dcow_publisher_keys: '{{ dchwww_publisher_keys }}'
chmod777_publisher_keys: '{{ dchwww_publisher_keys }}' chmod777_publisher_keys: '{{ dchwww_publisher_keys }}'
appsxyz_publisher_keys: '{{ dchwww_publisher_keys }}'
apache_server_name: pyrocufflink.net apache_server_name: pyrocufflink.net
userdir_proxy_backend: http://files.pyrocufflink.blue userdir_proxy_backend: http://files.pyrocufflink.blue
tabitha_publisher_keys: tabitha_publisher_keys:

View File

@ -0,0 +1 @@
appsxyz_publisher_keys: []

View File

@ -0,0 +1,23 @@
<VirtualHost _default_:80>
ServerName apps.du5t1n.xyz
RewriteEngine On
RewriteRule (.*) https://%{SERVER_NAME}$1 [R=301,L]
</VirtualHost>
<VirtualHost _default_:443>
ServerName apps.du5t1n.xyz
Include conf.d/ssl.include
SSLCertificateKeyFile /etc/pki/tls/private/apps.du5t1n.xyz.key
SSLCertificateFile /etc/pki/tls/certs/apps.du5t1n.xyz.cer
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains"
</IfModule>
DocumentRoot /srv/www/apps.du5t1n.xyz/htdocs
<Directory /srv/www/apps.du5t1n.xyz/htdocs>
Require all granted
</Directory>
</VirtualHost>

View File

@ -0,0 +1,7 @@
dependencies:
- role: cert
vars:
cert_src: websites/apps.du5t1n.xyz.cer
cert_dest: /etc/pki/tls/certs/apps.du5t1n.xyz.cer
cert_key_src: websites/apps.du5t1n.xyz.key
cert_key_dest: /etc/pki/tls/private/apps.du5t1n.xyz.key

View File

@ -0,0 +1,55 @@
- name: ensure rsync is installed
package:
name: rsync
state: present
tags:
- install
- name: ensure app group exists
group:
name: webapp.appsxyz
state: present
- name: ensure app user exists
user:
name: webapp.appsxyz
group: webapp.appsxyz
home: /srv/www/apps.du5t1n.xyz
createhome: true
state: present
- name: ensure app home directory permissions are set
file:
path: /srv/www/apps.du5t1n.xyz
mode: u=rwx,go=rx
state: directory
- name: ensure app ssh home directory exists
file:
path: /srv/www/apps.du5t1n.xyz/.ssh
mode: '0700'
owner: webapp.appsxyz
group: webapp.appsxyz
setype: ssh_home_t
state: directory
- name: ensure publisher keys are trusted
authorized_key:
key: "{{ appsxyz_publisher_keys|join('\n') }}"
user: webapp.appsxyz
exclusive: true
- name: ensure authorized_keys file permissions are correct
file:
path: /srv/www/apps.du5t1n.xyz/.ssh/authorized_keys
mode: u=rw,go=
owner: webapp.appsxyz
group: webapp.appsxyz
setype: ssh_home_t
- name: ensure apache is configured to serve apps.du5t1n.xyz
copy:
src: apps.du5t1n.xyz.httpd.conf
dest: /etc/httpd/conf.d/apps.du5t1n.xyz.conf
mode: u=rw,go=r
notify: reload httpd
tags:
- httpd-config

View File

@ -23,6 +23,8 @@
tags: websites/darkchestofwonders.us tags: websites/darkchestofwonders.us
- role: websites/chmod777.sh - role: websites/chmod777.sh
tags: websites/chmod777.sh tags: websites/chmod777.sh
- role: websites/apps.du5t1n.xyz
tags: websites/apps.du5t1n.xyz
- role: cert - role: cert
cert_src: websites/hatch.chat.cer cert_src: websites/hatch.chat.cer
cert_dest: /etc/pki/tls/certs/hatch.chat.cer cert_dest: /etc/pki/tls/certs/hatch.chat.cer