mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Optimized openproject for new repository structure
This commit is contained in:
2
roles/cmp-rdbms/vars/main.yml
Normal file
2
roles/cmp-rdbms/vars/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
# Docker
|
||||
docker_pull_git_repository: false # Deactivated here to don't inhire this
|
@@ -6,6 +6,7 @@
|
||||
git:
|
||||
repo: "{{ docker_repository_address }}"
|
||||
dest: "{{ docker_repository_path }}"
|
||||
version: "{{ docker_repository_branch | default('main') }}"
|
||||
depth: 1
|
||||
update: yes
|
||||
recursive: yes
|
||||
|
2
roles/srv-web-7-7-inj-compose/vars/main.yml
Normal file
2
roles/srv-web-7-7-inj-compose/vars/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
# Docker
|
||||
docker_pull_git_repository: false # Deactivated here to don't inhire this
|
@@ -10,4 +10,5 @@ openresty_version: "alpine"
|
||||
openresty_container: "{{ applications | get_app_conf(application_id, 'docker.services.openresty.name', True) }}"
|
||||
|
||||
# Docker
|
||||
docker_compose_flush_handlers: true
|
||||
docker_compose_flush_handlers: true
|
||||
docker_pull_git_repository: false # Deactivated here to don't inhire this
|
@@ -3,23 +3,23 @@
|
||||
include_role:
|
||||
name: cmp-db-docker-proxy
|
||||
|
||||
- name: "Create {{openproject_plugins_folder}}"
|
||||
- name: "Create {{ openproject_plugins_folder }}"
|
||||
file:
|
||||
path: "{{openproject_plugins_folder}}"
|
||||
path: "{{ openproject_plugins_folder }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: "Transfering Gemfile.plugins to {{openproject_plugins_folder}}"
|
||||
- name: "Transfering Gemfile.plugins to {{ openproject_plugins_folder }}"
|
||||
copy:
|
||||
src: Gemfile.plugins
|
||||
dest: "{{openproject_plugins_folder}}Gemfile.plugins"
|
||||
dest: "{{ openproject_plugins_folder }}Gemfile.plugins"
|
||||
notify:
|
||||
- docker compose up
|
||||
- docker compose build
|
||||
|
||||
- name: "create {{dummy_volume}}"
|
||||
- name: "create {{ openproject_dummy_volume }}"
|
||||
file:
|
||||
path: "{{dummy_volume}}"
|
||||
path: "{{ openproject_dummy_volume }}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
@@ -35,5 +35,5 @@
|
||||
loop: "{{ openproject_rails_settings | dict2items }}"
|
||||
|
||||
- name: Setup LDAP
|
||||
include_tasks: ldap.yml
|
||||
include_tasks: 01_ldap.yml
|
||||
when: applications | get_app_conf(application_id, 'features.ldap', True) | bool
|
@@ -2,7 +2,7 @@
|
||||
x-op-app: &app
|
||||
logging:
|
||||
driver: journald
|
||||
image: {{custom_openproject_image}}
|
||||
image: {{ openproject_custom_image }}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
@@ -16,7 +16,7 @@ x-op-app: &app
|
||||
|
||||
proxy:
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
image: {{custom_openproject_image}}
|
||||
image: {{ openproject_custom_image }}
|
||||
container_name: {{ openproject_proxy_name }}
|
||||
command: "./docker/prod/proxy"
|
||||
ports:
|
||||
@@ -27,7 +27,7 @@ x-op-app: &app
|
||||
- web
|
||||
volumes:
|
||||
- "data:/var/openproject/assets"
|
||||
- "{{dummy_volume}}:/var/openproject/pgdata" # This mount is unnecessary and just done to prevent anonymous volumes
|
||||
- "{{ openproject_dummy_volume }}:/var/openproject/pgdata" # This mount is unnecessary and just done to prevent anonymous volumes
|
||||
|
||||
web:
|
||||
<<: *app
|
||||
@@ -45,7 +45,7 @@ x-op-app: &app
|
||||
{% include 'roles/docker-container/templates/healthcheck/curl.yml.j2' %}
|
||||
volumes:
|
||||
- "data:/var/openproject/assets"
|
||||
- "{{dummy_volume}}:/var/openproject/pgdata" # This mount is unnecessary and just done to prevent anonymous volumes
|
||||
- "{{ openproject_dummy_volume }}:/var/openproject/pgdata" # This mount is unnecessary and just done to prevent anonymous volumes
|
||||
|
||||
worker:
|
||||
<<: *app
|
||||
@@ -60,7 +60,7 @@ x-op-app: &app
|
||||
condition: service_started
|
||||
volumes:
|
||||
- "data:/var/openproject/assets"
|
||||
- "{{dummy_volume}}:/var/openproject/pgdata" # This mount is unnecessary and just done to prevent anonymous volumes
|
||||
- "{{ openproject_dummy_volume }}:/var/openproject/pgdata" # This mount is unnecessary and just done to prevent anonymous volumes
|
||||
|
||||
|
||||
cron:
|
||||
@@ -76,7 +76,7 @@ x-op-app: &app
|
||||
condition: service_started
|
||||
volumes:
|
||||
- "data:/var/openproject/assets"
|
||||
- "{{dummy_volume}}:/var/openproject/pgdata" # This mount is unnecessary and just done to prevent anonymous volumes
|
||||
- "{{ openproject_dummy_volume }}:/var/openproject/pgdata" # This mount is unnecessary and just done to prevent anonymous volumes
|
||||
|
||||
seeder:
|
||||
<<: *app
|
||||
@@ -90,7 +90,7 @@ x-op-app: &app
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
volumes:
|
||||
- "data:/var/openproject/assets"
|
||||
- "{{dummy_volume}}:/var/openproject/pgdata" # This mount is unnecessary and just done to prevent anonymous volumes
|
||||
- "{{ openproject_dummy_volume }}:/var/openproject/pgdata" # This mount is unnecessary and just done to prevent anonymous volumes
|
||||
|
||||
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||
data:
|
||||
|
@@ -1,18 +1,22 @@
|
||||
application_id: "web-app-openproject"
|
||||
docker_repository_address: "https://github.com/opf/openproject-deploy"
|
||||
database_type: "postgres"
|
||||
docker_pull_git_repository: true
|
||||
openproject_version: "{{ applications | get_app_conf(application_id, 'docker.services.web.version', True) }}"
|
||||
openproject_image: "{{ applications | get_app_conf(application_id, 'docker.services.web.image', True) }}"
|
||||
openproject_volume: "{{ applications | get_app_conf(application_id, 'docker.volumes.data', True) }}"
|
||||
openproject_web_name: "{{ applications | get_app_conf(application_id, 'docker.services.web.name', True) }}"
|
||||
openproject_seeder_name: "{{ applications | get_app_conf(application_id, 'docker.services.seeder.name', True) }}"
|
||||
openproject_cron_name: "{{ applications | get_app_conf(application_id, 'docker.services.cron.name', True) }}"
|
||||
openproject_proxy_name: "{{ applications | get_app_conf(application_id, 'docker.services.proxy.name', True) }}"
|
||||
openproject_worker_name: "{{ applications | get_app_conf(application_id, 'docker.services.worker.name', True) }}"
|
||||
# General
|
||||
application_id: "web-app-openproject"
|
||||
|
||||
openproject_cache_name: "{{ applications | get_app_conf(application_id, 'docker.services.cache.name', True) }}"
|
||||
openproject_cache_image: "{{ applications
|
||||
# Database
|
||||
database_type: "postgres"
|
||||
|
||||
# Open Project Specific
|
||||
openproject_version: "{{ applications | get_app_conf(application_id, 'docker.services.web.version', True) }}"
|
||||
openproject_image: "{{ applications | get_app_conf(application_id, 'docker.services.web.image', True) }}"
|
||||
openproject_volume: "{{ applications | get_app_conf(application_id, 'docker.volumes.data', True) }}"
|
||||
openproject_web_name: "{{ applications | get_app_conf(application_id, 'docker.services.web.name', True) }}"
|
||||
openproject_seeder_name: "{{ applications | get_app_conf(application_id, 'docker.services.seeder.name', True) }}"
|
||||
openproject_cron_name: "{{ applications | get_app_conf(application_id, 'docker.services.cron.name', True) }}"
|
||||
openproject_proxy_name: "{{ applications | get_app_conf(application_id, 'docker.services.proxy.name', True) }}"
|
||||
openproject_worker_name: "{{ applications | get_app_conf(application_id, 'docker.services.worker.name', True) }}"
|
||||
|
||||
# Open Project Cache
|
||||
openproject_cache_name: "{{ applications | get_app_conf(application_id, 'docker.services.cache.name', True) }}"
|
||||
openproject_cache_image: "{{ applications
|
||||
| get_app_conf(application_id, 'docker.services.cache.image')
|
||||
or applications
|
||||
| get_app_conf('svc-db-memcached', 'docker.services.memcached.image')
|
||||
@@ -25,12 +29,12 @@ openproject_cache_version: "{{ applications
|
||||
}}"
|
||||
|
||||
|
||||
openproject_plugins_folder: "{{docker_compose.directories.volumes}}plugins/"
|
||||
openproject_plugins_folder: "{{docker_compose.directories.volumes}}plugins/"
|
||||
|
||||
custom_openproject_image: "custom_openproject"
|
||||
openproject_custom_image: "custom_openproject"
|
||||
|
||||
# The following volume doesn't have a practcical function. It just exist to prevent the creation of unnecessary anonymous volumes
|
||||
dummy_volume: "{{docker_compose.directories.volumes}}dummy_volume"
|
||||
openproject_dummy_volume: "{{docker_compose.directories.volumes}}dummy_volume"
|
||||
|
||||
openproject_rails_settings:
|
||||
email_delivery_method: "smtp"
|
||||
@@ -46,3 +50,9 @@ openproject_filters:
|
||||
|
||||
users: "{{ '(memberOf=cn=openproject-users,' ~ ldap.dn.ou.roles ~ ')'
|
||||
if applications | get_app_conf(application_id, 'ldap.filters.users', True) else '' }}"
|
||||
|
||||
# Docker
|
||||
docker_repository_branch: "stable/{{ openproject_version }}"
|
||||
docker_repository_address: "https://github.com/opf/openproject-deploy"
|
||||
docker_pull_git_repository: true
|
||||
docker_compose_flush_handlers: false
|
Reference in New Issue
Block a user