Searx, Clippable, & Filebrowser services are now running on the host

Reverse proxy is the last step before they are exposed to the outside
This commit is contained in:
shockrah 2022-11-09 00:17:22 -08:00
parent 7d6fee4781
commit 7ddd15c4a5
7 changed files with 136 additions and 0 deletions

View File

@ -0,0 +1,34 @@
---
- hosts: atlas
become: yes
vars:
CLIPPABLE_ROOT: "{{ CLIPPABLE_MOUNT_POINT }}/clips"
tasks:
- name: Fetch vars for getting mount points
include_vars:
file: ../../vars/drives.yml
- name: Create mountpoints for volumes
file:
state: directory
path: "{{ CLIPPABLE_ROOT }}/{{ item }}"
loop:
- clips
- thumbnails
- name: Pull latest Clippable Image
community.docker.docker_container:
name: clippable
image: registry.gitlab.com/shockrah/clippable:latest
pull: yes
restart_policy: always
recreate: yes
env:
SITE_NAME: "Shockrah's Clips"
SITE_DESC: "Short clips of random stuff I do"
SITE_URL: "https://clips.shockrah.xyz"
ports:
- "8482:8482"
volumes:
- "{{CLIPPABLE_ROOT}}/clips:/media/clips"
- "{{CLIPPABLE_ROOT}}/thumbnails:/media/thumbnails"

View File

@ -0,0 +1,23 @@
# This playbook goes through the process of setting up a simple FTP server on
# the target host.
---
- hosts: atlas
become: yes
tasks:
- name: Fetch vars for getting mount points
include_vars:
file: ../../vars/drives.yml
- name: Setup Filebrowser Container
community.docker.docker_container:
name: filebrowser
image: filebrowser/filebrowser
restart_policy: always
volumes:
- "{{ FILEBROWSER_MOUNT_POINT }}/files:/srv"
ports:
- "8000:80"
user: "0:0"

View File

@ -0,0 +1,14 @@
---
- hosts: atlas
tasks:
- name: Fetch vars for getting mount points
include_vars:
file: ../vars/drives.yml
- name: Copy over Filebrowser & Clippable data from local
become: yes
copy:
src: "{{ item.src }}"
dest: "{{ item.dst }}"
loop:
- { src: "{{ filebrowser }}", dst: "{{ FILEBROWSER_MOUNT_POINT }}" }
- { src: "{{ clippable }}" , dst: "{{ CLIPPABLE_MOUNT_POINT }}" }

View File

@ -0,0 +1,30 @@
---
- hosts: atlas
become: yes
tasks:
- name: Create /var/www/ Configuration Directory
file:
path: /var/www/
state: directory
- name: Create /var/www/searx/ Searx configuration Directory
file:
path: /var/www/searx
state: directory
- name: Copy Searx Configuration to /var/www/searx
copy:
src: settings.yml
dest: /var/www/searx/settings.yml
- name: Pull latest Searx Repo patches
community.docker.docker_container:
name: searx
image: searx/searx
pull: yes
restart_policy: always
recreate: yes
volumes:
- "/var/www/searx/settings.yml:/etc/searx/settings.yml"
ports:
- "8080:8080"

View File

@ -0,0 +1,20 @@
use_default_settings: True
general:
debug : False # Debug mode, only for development
instance_name : "Project Athens SearX" # displayed name
search:
safe_search : 0 # Filter results. 0: None, 1: Moderate, 2: Strict
autocomplete : "" # Existing autocomplete backends: "dbpedia", "duckduckgo", "google", "startpage", "swisscows", "qwant", "wikipedia" - leave blank to turn it off by default
default_lang : "" # Default search language - leave blank to detect from browser information or use codes from 'languages.py'
server:
port : 8080
bind_address : "127.0.0.1" # explicitly only listen on localhost
# This key only matters for API users which I don't care about
# Hence this is fine because meh.jpg
secret_key : "VnnTHjYycpMerevPKQ5DAngpcZ3in5R8wgshvz2kW1LBDw6Z/ytWGdkZfXZTdY7zMb0oe6UXoZ9a"
base_url : "https://search.project-athens.xyz"
image_proxy : False # Proxying image results through searx

View File

@ -0,0 +1,8 @@
# Here we just call other playbooks to setup the services in the same way
# that the alpha host would set them up.
# NOTE: lewdlad is not included here because it is deployed via pipeline
# in it's own repository
---
- import_playbook: './searx/main.yml'
- import_playbook: './filebrowser/main.yml'
- import_playbook: './clippable/main.yml'

View File

@ -17,6 +17,13 @@
- gnupg
- software-properties-common
- lsb-release
- python3
- python3-pip
- name: Install docker-py
pip:
name: docker-py
state: present
- name: Install docker GPG key
apt_key: