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 reqtimeout_module modules/mod_reqtimeout.so
|
||||||
#LoadModule ext_filter_module modules/mod_ext_filter.so
|
#LoadModule ext_filter_module modules/mod_ext_filter.so
|
||||||
#LoadModule request_module modules/mod_request.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 filter_module modules/mod_filter.so
|
||||||
#LoadModule reflector_module modules/mod_reflector.so
|
#LoadModule reflector_module modules/mod_reflector.so
|
||||||
#LoadModule substitute_module modules/mod_substitute.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 unique_id_module modules/mod_unique_id.so
|
||||||
LoadModule setenvif_module modules/mod_setenvif.so
|
LoadModule setenvif_module modules/mod_setenvif.so
|
||||||
LoadModule version_module modules/mod_version.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_module modules/mod_proxy.so
|
||||||
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
|
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
|
||||||
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
|
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
|
||||||
@@ -277,6 +277,7 @@ DocumentRoot "/usr/local/apache2/htdocs"
|
|||||||
# for more information.
|
# for more information.
|
||||||
#
|
#
|
||||||
Options Indexes FollowSymLinks
|
Options Indexes FollowSymLinks
|
||||||
|
Options +Includes
|
||||||
|
|
||||||
#
|
#
|
||||||
# AllowOverride controls what directives may be placed in .htaccess files.
|
# AllowOverride controls what directives may be placed in .htaccess files.
|
||||||
@@ -293,17 +294,17 @@ DocumentRoot "/usr/local/apache2/htdocs"
|
|||||||
#
|
#
|
||||||
# Custom
|
# 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>
|
</Directory>
|
||||||
|
|
||||||
<Location "/server-status">
|
<Location "/server-status">
|
||||||
SetHandler server-status
|
SetHandler server-status
|
||||||
Require host localhost
|
Require ip 127.0.0.1/32
|
||||||
</Location>
|
</Location>
|
||||||
|
|
||||||
RemoteIPHeader X-Forwarded-For
|
|
||||||
RemoteIPTrustedProxy 10.0.0.0/8
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# DirectoryIndex: sets the file that Apache will serve if a directory
|
# DirectoryIndex: sets the file that Apache will serve if a directory
|
||||||
# is requested.
|
# is requested.
|
||||||
@@ -545,8 +546,6 @@ LogLevel warn
|
|||||||
# Various default settings
|
# Various default settings
|
||||||
#Include conf/extra/httpd-default.conf
|
#Include conf/extra/httpd-default.conf
|
||||||
|
|
||||||
Include conf/extra/httpd-gitweb.conf
|
|
||||||
|
|
||||||
# Configure mod_proxy_html to understand HTML4/XHTML1
|
# Configure mod_proxy_html to understand HTML4/XHTML1
|
||||||
<IfModule proxy_html_module>
|
<IfModule proxy_html_module>
|
||||||
Include conf/extra/proxy-html.conf
|
Include conf/extra/proxy-html.conf
|
||||||
|
|||||||
189
tasks/main.yml
189
tasks/main.yml
@@ -26,75 +26,6 @@
|
|||||||
requests:
|
requests:
|
||||||
storage: 8Ti
|
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
|
- name: configmap for httpd.conf
|
||||||
k8s:
|
k8s:
|
||||||
state: present
|
state: present
|
||||||
@@ -107,47 +38,23 @@
|
|||||||
data:
|
data:
|
||||||
httpd.conf: "{{ lookup('file', 'httpd.conf') }}"
|
httpd.conf: "{{ lookup('file', 'httpd.conf') }}"
|
||||||
|
|
||||||
- name: configmap for httpd-gitweb.conf
|
- name: deployment for www
|
||||||
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
|
|
||||||
k8s:
|
k8s:
|
||||||
definition:
|
definition:
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: gitweb
|
name: httpd
|
||||||
namespace: www
|
namespace: www
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: gitweb
|
app: httpd
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: gitweb
|
app: httpd
|
||||||
spec:
|
spec:
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: init
|
- name: init
|
||||||
@@ -155,13 +62,13 @@
|
|||||||
command:
|
command:
|
||||||
- /bin/bash
|
- /bin/bash
|
||||||
- -c
|
- -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:
|
volumeMounts:
|
||||||
- name: data
|
- name: data
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
containers:
|
containers:
|
||||||
- name: gitweb
|
- name: httpd
|
||||||
image: ericomeehan/gitweb:latest
|
image: ericomeehan/www:latest
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
@@ -172,12 +79,6 @@
|
|||||||
- name: httpd
|
- name: httpd
|
||||||
mountPath: /usr/local/apache2/conf/httpd.conf
|
mountPath: /usr/local/apache2/conf/httpd.conf
|
||||||
subPath: 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:
|
volumes:
|
||||||
- name: data
|
- name: data
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
@@ -185,12 +86,6 @@
|
|||||||
- name: httpd
|
- name: httpd
|
||||||
configMap:
|
configMap:
|
||||||
name: httpd
|
name: httpd
|
||||||
- name: httpd-gitweb
|
|
||||||
configMap:
|
|
||||||
name: httpd-gitweb
|
|
||||||
- name: gitweb
|
|
||||||
configMap:
|
|
||||||
name: gitweb
|
|
||||||
|
|
||||||
- name: service for prometheus
|
- name: service for prometheus
|
||||||
k8s:
|
k8s:
|
||||||
@@ -202,28 +97,27 @@
|
|||||||
namespace: www
|
namespace: www
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
app: gitweb
|
app: httpd
|
||||||
ports:
|
ports:
|
||||||
- port: 9117
|
- port: 9117
|
||||||
name: http
|
name: http
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
|
|
||||||
- name: service for gitweb
|
- name: service for httpd
|
||||||
k8s:
|
k8s:
|
||||||
definition:
|
definition:
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: gitweb
|
name: httpd
|
||||||
namespace: www
|
namespace: www
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
app: gitweb
|
app: httpd
|
||||||
ports:
|
ports:
|
||||||
- port: 80
|
- port: 80
|
||||||
name: http
|
name: http
|
||||||
externalTrafficPolicy: Local
|
type: ClusterIP
|
||||||
type: LoadBalancer
|
|
||||||
|
|
||||||
- name: onionservice
|
- name: onionservice
|
||||||
k8s:
|
k8s:
|
||||||
@@ -231,7 +125,7 @@
|
|||||||
apiVersion: tor.k8s.torproject.org/v1alpha2
|
apiVersion: tor.k8s.torproject.org/v1alpha2
|
||||||
kind: OnionService
|
kind: OnionService
|
||||||
metadata:
|
metadata:
|
||||||
name: www
|
name: httpd
|
||||||
namespace: www
|
namespace: www
|
||||||
spec:
|
spec:
|
||||||
version: 3
|
version: 3
|
||||||
@@ -240,7 +134,7 @@
|
|||||||
number: 80
|
number: 80
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: www
|
name: httpd
|
||||||
port:
|
port:
|
||||||
number: 80
|
number: 80
|
||||||
|
|
||||||
@@ -267,7 +161,7 @@
|
|||||||
path: /
|
path: /
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: gitweb
|
name: httpd
|
||||||
port:
|
port:
|
||||||
number: 80
|
number: 80
|
||||||
tls:
|
tls:
|
||||||
@@ -275,56 +169,3 @@
|
|||||||
- eom.dev
|
- eom.dev
|
||||||
secretName: www
|
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