Updated for new homepage
This commit is contained in:
@@ -111,7 +111,7 @@ LoadModule auth_basic_module modules/mod_auth_basic.so
|
||||
LoadModule reqtimeout_module modules/mod_reqtimeout.so
|
||||
#LoadModule ext_filter_module modules/mod_ext_filter.so
|
||||
#LoadModule request_module modules/mod_request.so
|
||||
#LoadModule include_module modules/mod_include.so
|
||||
LoadModule include_module modules/mod_include.so
|
||||
LoadModule filter_module modules/mod_filter.so
|
||||
#LoadModule reflector_module modules/mod_reflector.so
|
||||
#LoadModule substitute_module modules/mod_substitute.so
|
||||
@@ -138,7 +138,7 @@ LoadModule headers_module modules/mod_headers.so
|
||||
#LoadModule unique_id_module modules/mod_unique_id.so
|
||||
LoadModule setenvif_module modules/mod_setenvif.so
|
||||
LoadModule version_module modules/mod_version.so
|
||||
LoadModule remoteip_module modules/mod_remoteip.so
|
||||
#LoadModule remoteip_module modules/mod_remoteip.so
|
||||
#LoadModule proxy_module modules/mod_proxy.so
|
||||
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
|
||||
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
|
||||
@@ -277,6 +277,7 @@ DocumentRoot "/usr/local/apache2/htdocs"
|
||||
# for more information.
|
||||
#
|
||||
Options Indexes FollowSymLinks
|
||||
Options +Includes
|
||||
|
||||
#
|
||||
# AllowOverride controls what directives may be placed in .htaccess files.
|
||||
@@ -293,17 +294,17 @@ DocumentRoot "/usr/local/apache2/htdocs"
|
||||
#
|
||||
# Custom
|
||||
#
|
||||
Header add Link "</common/catppuccin.css>; rel=stylesheet; type=text/css"
|
||||
Header add Link "</static/catppuccin.css>; rel=stylesheet; type=text/css"
|
||||
Header add Link "</favicon.ico>; rel=icon; type=image/x-icon"
|
||||
|
||||
AddOutputFilter INCLUDES .html
|
||||
</Directory>
|
||||
|
||||
<Location "/server-status">
|
||||
SetHandler server-status
|
||||
Require host localhost
|
||||
Require ip 127.0.0.1/32
|
||||
</Location>
|
||||
|
||||
RemoteIPHeader X-Forwarded-For
|
||||
RemoteIPTrustedProxy 10.0.0.0/8
|
||||
|
||||
#
|
||||
# DirectoryIndex: sets the file that Apache will serve if a directory
|
||||
# is requested.
|
||||
@@ -545,8 +546,6 @@ LogLevel warn
|
||||
# Various default settings
|
||||
#Include conf/extra/httpd-default.conf
|
||||
|
||||
Include conf/extra/httpd-gitweb.conf
|
||||
|
||||
# Configure mod_proxy_html to understand HTML4/XHTML1
|
||||
<IfModule proxy_html_module>
|
||||
Include conf/extra/proxy-html.conf
|
||||
|
||||
189
tasks/main.yml
189
tasks/main.yml
@@ -26,75 +26,6 @@
|
||||
requests:
|
||||
storage: 8Ti
|
||||
|
||||
- name: configmap for authorized_keys
|
||||
k8s:
|
||||
state: present
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: keys
|
||||
namespace: www
|
||||
data:
|
||||
authorized_keys: "{{ lookup('template', 'authorized_keys.j2') }}"
|
||||
|
||||
- name: configmap for mailsync.py
|
||||
k8s:
|
||||
state: present
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: mailsync
|
||||
namespace: www
|
||||
data:
|
||||
mailsync.py: "{{ lookup('file', 'mailsync.py') }}"
|
||||
|
||||
- name: cronjob
|
||||
k8s:
|
||||
definition:
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: mailsync
|
||||
namespace: www
|
||||
spec:
|
||||
schedule: "{{ www_cron_schedule }}"
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: python
|
||||
image: python:3
|
||||
imagePullPolicy: IfNotPresent
|
||||
command:
|
||||
- python
|
||||
- /usr/src/mailsync.py
|
||||
env:
|
||||
- name: USERNAME
|
||||
value: "{{ www_username }}"
|
||||
- name: PASSWORD
|
||||
value: "{{ www_password }}"
|
||||
- name: IMAP_SERVER
|
||||
value: "{{ www_imap_server}}"
|
||||
- name: SAVE_DIR
|
||||
value: "{{ www_save_dir }}"
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
- name: mailsync
|
||||
mountPath: /usr/src/mailsync.py
|
||||
subPath: mailsync.py
|
||||
restartPolicy: OnFailure
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: data
|
||||
- name: mailsync
|
||||
configMap:
|
||||
name: mailsync
|
||||
|
||||
- name: configmap for httpd.conf
|
||||
k8s:
|
||||
state: present
|
||||
@@ -107,47 +38,23 @@
|
||||
data:
|
||||
httpd.conf: "{{ lookup('file', 'httpd.conf') }}"
|
||||
|
||||
- name: configmap for httpd-gitweb.conf
|
||||
k8s:
|
||||
state: present
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: httpd-gitweb
|
||||
namespace: www
|
||||
data:
|
||||
httpd-gitweb.conf: "{{ lookup('file', 'httpd-gitweb.conf') }}"
|
||||
|
||||
- name: configmap for gitweb.conf
|
||||
k8s:
|
||||
state: present
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: gitweb
|
||||
namespace: www
|
||||
data:
|
||||
gitweb.conf: "{{ lookup('file', 'gitweb.conf') }}"
|
||||
|
||||
- name: deployment for gitweb
|
||||
- name: deployment for www
|
||||
k8s:
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: gitweb
|
||||
name: httpd
|
||||
namespace: www
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: gitweb
|
||||
app: httpd
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: gitweb
|
||||
app: httpd
|
||||
spec:
|
||||
initContainers:
|
||||
- name: init
|
||||
@@ -155,13 +62,13 @@
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- "apt update -y && apt install -y git && git clone {{ www_repo_url }} /tmp/www && cp -r /tmp/www/htdocs/* /data/"
|
||||
- "apt update -y && apt install -y git && git clone {{ www_repo_url }} /tmp/www && rm -rf /data/* && cp -r /tmp/www/htdocs/* /data/"
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
containers:
|
||||
- name: gitweb
|
||||
image: ericomeehan/gitweb:latest
|
||||
- name: httpd
|
||||
image: ericomeehan/www:latest
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 80
|
||||
@@ -172,12 +79,6 @@
|
||||
- name: httpd
|
||||
mountPath: /usr/local/apache2/conf/httpd.conf
|
||||
subPath: httpd.conf
|
||||
- name: httpd-gitweb
|
||||
mountPath: /usr/local/apache2/conf/extra/httpd-gitweb.conf
|
||||
subPath: httpd-gitweb.conf
|
||||
- name: gitweb
|
||||
mountPath: /etc/gitweb.conf
|
||||
subPath: gitweb.conf
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
@@ -185,12 +86,6 @@
|
||||
- name: httpd
|
||||
configMap:
|
||||
name: httpd
|
||||
- name: httpd-gitweb
|
||||
configMap:
|
||||
name: httpd-gitweb
|
||||
- name: gitweb
|
||||
configMap:
|
||||
name: gitweb
|
||||
|
||||
- name: service for prometheus
|
||||
k8s:
|
||||
@@ -202,28 +97,27 @@
|
||||
namespace: www
|
||||
spec:
|
||||
selector:
|
||||
app: gitweb
|
||||
app: httpd
|
||||
ports:
|
||||
- port: 9117
|
||||
name: http
|
||||
type: ClusterIP
|
||||
|
||||
- name: service for gitweb
|
||||
- name: service for httpd
|
||||
k8s:
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: gitweb
|
||||
name: httpd
|
||||
namespace: www
|
||||
spec:
|
||||
selector:
|
||||
app: gitweb
|
||||
app: httpd
|
||||
ports:
|
||||
- port: 80
|
||||
name: http
|
||||
externalTrafficPolicy: Local
|
||||
type: LoadBalancer
|
||||
type: ClusterIP
|
||||
|
||||
- name: onionservice
|
||||
k8s:
|
||||
@@ -231,7 +125,7 @@
|
||||
apiVersion: tor.k8s.torproject.org/v1alpha2
|
||||
kind: OnionService
|
||||
metadata:
|
||||
name: www
|
||||
name: httpd
|
||||
namespace: www
|
||||
spec:
|
||||
version: 3
|
||||
@@ -240,7 +134,7 @@
|
||||
number: 80
|
||||
backend:
|
||||
service:
|
||||
name: www
|
||||
name: httpd
|
||||
port:
|
||||
number: 80
|
||||
|
||||
@@ -267,7 +161,7 @@
|
||||
path: /
|
||||
backend:
|
||||
service:
|
||||
name: gitweb
|
||||
name: httpd
|
||||
port:
|
||||
number: 80
|
||||
tls:
|
||||
@@ -275,56 +169,3 @@
|
||||
- eom.dev
|
||||
secretName: www
|
||||
|
||||
- name: deployment for gitserver
|
||||
k8s:
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: gitserver
|
||||
namespace: www
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: gitserver
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: gitserver
|
||||
spec:
|
||||
containers:
|
||||
- name: gitserver
|
||||
image: ericomeehan/gitserver:latest
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 22
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /home/git/data
|
||||
- name: keys
|
||||
mountPath: /auth
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: data
|
||||
- name: keys
|
||||
configMap:
|
||||
name: keys
|
||||
|
||||
- name: service for gitserver
|
||||
k8s:
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: gitserver
|
||||
namespace: www
|
||||
spec:
|
||||
selector:
|
||||
app: gitserver
|
||||
ports:
|
||||
- port: 22
|
||||
name: gitserver
|
||||
type: LoadBalancer
|
||||
|
||||
|
||||
Reference in New Issue
Block a user