add display

This commit is contained in:
Gabriel Augendre 2024-10-12 11:21:44 +02:00
parent 7cdcbd9d87
commit 272646728f
6 changed files with 37 additions and 0 deletions

View file

@ -5,6 +5,7 @@
- import_playbook: checkout.yaml # noqa: name[play]
- import_playbook: code.yaml # noqa: name[play]
- import_playbook: collabora.yaml # noqa: name[play]
- import_playbook: display.yaml # noqa: name[play]
- import_playbook: ghost-update.yaml # noqa: name[play]
- import_playbook: gitea.yaml # noqa: name[play]
- import_playbook: goatcounter.yaml # noqa: name[play]

View file

@ -0,0 +1,24 @@
---
- name: Display
hosts: servers
gather_facts: false
tasks:
- name: Fix git config
community.general.git_config:
scope: global
name: merge.conflictstyle
value: diff3
- name: Pull git repo
ansible.builtin.git:
executable: /usr/bin/git
repo: https://git.augendre.info/gaugendre/display.git
dest: "{{ dir }}/sources"
version: HEAD # noqa: latest[git] # we want the latest revision
- name: Docker
ansible.builtin.include_role:
name: docker
vars:
docker_app_name: display
docker_build: always
dir: /mnt/data/{{ docker_app_name }}

View file

@ -0,0 +1,7 @@
services:
app:
build:
context: sources
restart: always
ports:
- "9010:80"

View file

@ -0,0 +1,3 @@
#!/bin/bash
git -C ./sources pull
docker compose --ansi never up -d --build

View file

@ -1,3 +1,4 @@
---
docker_app_name: some-app
docker_dir: /mnt/data/{{ docker_app_name }}
docker_build: policy

View file

@ -8,4 +8,5 @@
community.docker.docker_compose_v2:
project_src: "{{ docker_dir }}"
state: present
build: "{{ docker_build }}"
listen: Restart service