roles: refactor roles to start a docker container with directus and psotgresql database, add text-editor tool

This commit is contained in:
Jan Völkel 2025-03-22 21:11:24 +01:00
parent e17f194745
commit 7bdbf243f2
Signed by: Jan Völkel
SSH key fingerprint: SHA256:adl1xwySHDTNcPt/f+Y8np42DFn8wbykFk3KWvbZWXk
16 changed files with 249 additions and 157 deletions

View file

@ -0,0 +1,32 @@
---
- name: Ensure project base directory exists
file:
path: "/opt/{{ domain }}"
state: directory
owner: "{{ user_name }}"
group: "{{ user_name }}"
mode: '0755'
- name: Ensure Directus project directory exists
file:
path: "/opt/{{ domain }}/directus"
state: directory
owner: "{{ user_name }}"
group: "{{ user_name }}"
mode: '0755'
- name: Copy docker compose file (directus)
copy:
src: "files/docker-compose.yml"
dest: "/opt/{{ domain }}/directus"
- name: Copy env file (directus)
copy:
src: "files/.env"
dest: "/opt/{{ domain }}/directus"
- name: Start docker container with compose file
community.docker.docker_compose_v2:
project_src: "/opt/{{ domain }}/directus"
files:
- "docker-compose.yml"