implemented compose by url, parse, local yaml.

This commit is contained in:
boris committed 2026-07-10 13:32:40 +01:00
1 parent 53695f4fff
commit 784fff8faf
218 files changed
+2271 -640

No files matched your search

+1
View File
@@ -0,0 +1 @@
-6
View File
@@ -1,6 +0,0 @@
---
- name: restart ocis
community.docker.docker_compose_v2:
project_src: "{{ ocis_dir }}"
state: restarted
+17 -41
View File
@@ -12,44 +12,20 @@
- "{{ ocis_data_dir }}"
tags: [ocis]
- name: Render oCIS environment
ansible.builtin.template:
src: env.j2
dest: "{{ ocis_dir }}/.env"
owner: root
group: root
mode: "0600"
no_log: true
tags: [ocis, config]
- name: Ensure oCIS proxy network exists
community.docker.docker_network:
name: "{{ ocis_traefik_network }}"
state: present
when: ocis_routing_mode == "traefik"
tags: [ocis, docker]
- name: Render oCIS Compose file
ansible.builtin.template:
src: compose.yaml.j2
dest: "{{ ocis_dir }}/compose.yaml"
owner: root
group: root
mode: "0644"
notify: restart ocis
tags: [ocis, compose]
- name: Allow oCIS ports
community.general.ufw:
rule: allow
port: "{{ item }}"
proto: tcp
loop: "{{ ocis_tcp_ports }}"
when: ocis_routing_mode == "host"
tags: [ocis, firewall]
- name: Start oCIS
community.docker.docker_compose_v2:
project_src: "{{ ocis_dir }}"
state: present
tags: [ocis, compose]
- name: Deploy oCIS Compose project
ansible.builtin.include_role:
name: compose_project
vars:
compose_project_dir: "{{ ocis_dir }}"
compose_project_directories:
- "{{ ocis_dir }}"
- "{{ ocis_config_dir }}"
- "{{ ocis_data_dir }}"
compose_project_env_template_src: "{{ playbook_dir }}/../roles/ocis/templates/env.j2"
compose_project_compose_template_src: "{{ playbook_dir }}/../roles/ocis/templates/compose.yaml.j2"
compose_project_override_template_src: "{{ playbook_dir }}/../roles/ocis/templates/compose.override.yaml.j2"
compose_project_create_proxy_network: "{{ ocis_routing_mode == 'traefik' }}"
compose_project_proxy_network: "{{ ocis_traefik_network }}"
compose_project_firewall_ports: "{{ ocis_tcp_ports }}"
compose_project_firewall_enabled: "{{ ocis_routing_mode in ['host', 'traefik_file'] }}"
tags: [ocis]
@@ -0,0 +1,3 @@
services:
ocis: {}
+2 -2
View File
@@ -4,9 +4,9 @@ services:
restart: unless-stopped
command: server
env_file: .env
{% if ocis_routing_mode == "host" %}
{% if ocis_routing_mode in ["host", "traefik_file"] %}
ports:
- "{{ ocis_http_port }}:9200"
- "{{ nbops_traefik_file_bind_address if ocis_routing_mode == 'traefik_file' else '0.0.0.0' }}:{{ ocis_http_port }}:9200"
{% endif %}
{% if ocis_routing_mode == "traefik" %}
# internal HTTP service port: 9200; not published on the Docker host
+7
View File
@@ -0,0 +1,7 @@
# Upstream Snapshot
This directory stores copied upstream reference files for the `ocis` role.
See `docs/upstream-sources.yml` for repository URLs, refs, README paths, Compose paths, and verification status.
Snapshot files are reference material only. Deployments are generated from this role's `templates/` directory.