+ CLippable service setup
This commit is contained in:
parent
d0b58cbb9d
commit
72c45c7bb7
31
playbooks/alpha/clippable.yml
Normal file
31
playbooks/alpha/clippable.yml
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
- hosts: alpha
|
||||
become: yes
|
||||
vars:
|
||||
CLIPPABLE_ROOT: /mnt/drive1
|
||||
tasks:
|
||||
- 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"
|
||||
|
30
playbooks/alpha/nginx/clippable.yml
Normal file
30
playbooks/alpha/nginx/clippable.yml
Normal file
@ -0,0 +1,30 @@
|
||||
# It is important to keep in mind that these websites are to be served under
|
||||
# either port 80 or port 443. The reasoning for allowing port 80 connections
|
||||
# is because the content here is not sensitive and I'm 100% sure I'm going
|
||||
# to get traffic from glow-friends so there
|
||||
|
||||
---
|
||||
- hosts: beta
|
||||
become: yes
|
||||
tasks:
|
||||
- name: Push clips.shockrah.xyz config(nginx)
|
||||
copy:
|
||||
src: "clips.shockrah.xyz"
|
||||
dest: "/etc/nginx/sites-available/clips.shockrah.xyz"
|
||||
|
||||
- name: Enable clips nginx config
|
||||
file:
|
||||
src: /etc/nginx/sites-available/clips.shockrah.xyz
|
||||
dest: /etc/nginx/sites-enabled/clips.shockrah.xyz
|
||||
state: link
|
||||
|
||||
- name: Restart Nginx
|
||||
service:
|
||||
name: nginx
|
||||
state: restarted
|
||||
|
||||
- name: Install New Certificate for all sites
|
||||
command: >
|
||||
certbot -n --nginx -m "dev@shockrah.xyz" --agree-tos
|
||||
--domains clips.shockrah.xyz
|
||||
|
12
playbooks/alpha/nginx/clips.shockrah.xyz
Normal file
12
playbooks/alpha/nginx/clips.shockrah.xyz
Normal file
@ -0,0 +1,12 @@
|
||||
# This file contains a base configuration file for the projectathens
|
||||
# It is to be overwritten by certbot later on so adjusting this config
|
||||
# should not happen on the target server
|
||||
|
||||
server {
|
||||
server_name clips.shockrah.xyz;
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8482;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user