stroopwafel
This commit is contained in:
@@ -30,6 +30,10 @@ cloud_nginx_sites:
|
||||
port: 8087
|
||||
max_body: 2g # song uploads
|
||||
|
||||
stroopwafel_dir: /opt/stroopwafel
|
||||
stroopwafel_repo: gitea@git.hoekveen.net:mark/stroopwafel.git
|
||||
stroopwafel_version: master
|
||||
|
||||
backup_dump_dir: /var/backups/aurbis
|
||||
backup_paths:
|
||||
- /etc # nginx, certs, systemd units
|
||||
|
||||
@@ -121,6 +121,7 @@
|
||||
- import_tasks: tasks/hdwiki.yml
|
||||
- import_tasks: tasks/gitea.yml
|
||||
- import_tasks: tasks/nightingale.yml
|
||||
- import_tasks: tasks/stroopwafel.yml
|
||||
- import_tasks: tasks/cloud_nginx.yml
|
||||
- name: Ensure the backup user can run the forced-command pull
|
||||
user:
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
# Pulling needs to have git access; root does not.
|
||||
- name: Include stroopwafel vault
|
||||
include_vars:
|
||||
dir: stroopwafel
|
||||
files_matching: vault.yml
|
||||
- name: Create stroopwafel directory
|
||||
file:
|
||||
path: "{{ stroopwafel_dir }}"
|
||||
state: directory
|
||||
owner: root
|
||||
group: "{{ service_group | default('aurbis') }}"
|
||||
mode: "0775"
|
||||
- name: Check out stroopwafel source
|
||||
ansible.builtin.git:
|
||||
repo: "{{ stroopwafel_repo }}"
|
||||
dest: "{{ stroopwafel_dir }}"
|
||||
version: "{{ stroopwafel_version }}"
|
||||
update: "{{ stroopwafel_update | default(false) }}"
|
||||
accept_hostkey: true
|
||||
force: false
|
||||
become_user: "{{ stroopwafel_git_user | default(omit) }}"
|
||||
- name: Deploy stroopwafel .env
|
||||
copy:
|
||||
content: "{{ stroopwafel_env_b64 | b64decode }}"
|
||||
dest: "{{ stroopwafel_dir }}/.env"
|
||||
owner: root
|
||||
group: "{{ service_group | default('aurbis') }}"
|
||||
mode: "0640"
|
||||
when: stroopwafel_env_b64 is defined
|
||||
no_log: true
|
||||
- name: Copy docker-compose file
|
||||
template:
|
||||
src: stroopwafel/docker-compose.yml.j2
|
||||
dest: "{{ stroopwafel_dir }}/docker-compose.yml"
|
||||
owner: root
|
||||
group: "{{ service_group | default('aurbis') }}"
|
||||
mode: "0664"
|
||||
- name: Start stroopwafel
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ stroopwafel_dir }}"
|
||||
build: policy
|
||||
@@ -0,0 +1,7 @@
|
||||
services:
|
||||
stroopwafel:
|
||||
build: .
|
||||
command: python Stroopwafel.py
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- .:/opt/stroopwafel
|
||||
Reference in New Issue
Block a user