Refactored docker logic

This commit is contained in:
2025-05-25 17:44:58 +02:00
parent 7a7825cc61
commit cdfd464bce
53 changed files with 95 additions and 146 deletions

View File

@@ -10,23 +10,16 @@
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
- name: "Create {{openproject_plugins_service}}"
- name: "Create {{openproject_plugins_folder}}"
file:
path: "{{openproject_plugins_service}}"
path: "{{openproject_plugins_folder}}"
state: directory
mode: '0755'
- name: "Transfering Gemfile.plugins to {{openproject_plugins_service}}"
- name: "Transfering Gemfile.plugins to {{openproject_plugins_folder}}"
copy:
src: Gemfile.plugins
dest: "{{openproject_plugins_service}}Gemfile.plugins"
notify:
- docker compose project build and setup
- name: "Transfering Dockerfile to {{openproject_plugins_service}}Dockerfile"
template:
src: Dockerfile
dest: "{{openproject_plugins_service}}Dockerfile"
dest: "{{openproject_plugins_folder}}Gemfile.plugins"
notify:
- docker compose project build and setup
@@ -40,8 +33,7 @@
state: directory
mode: 0755
- name: "copy docker-compose.yml and env file"
include_tasks: copy-docker-compose-and-env.yml
- include_tasks: "{{ playbook_dir }}/roles/docker-compose/tasks/create-files.yml"
- name: flush docker service
meta: flush_handlers

View File

@@ -5,7 +5,7 @@ FROM openproject/community:{{applications.openproject.version}}
# path inside of the container. Say for `/app/vendor/plugins/openproject-slack`:
# COPY /path/to/my/local/openproject-slack /app/vendor/plugins/openproject-slack
COPY Gemfile.plugins /app/
COPY volumes/plugins/Gemfile.plugins /app/
# If the plugin uses any external NPM dependencies you have to install them here.
# RUN npm add npm <package-name>*

View File

@@ -4,7 +4,7 @@ x-op-app: &app
driver: journald
image: {{custom_openproject_image}}
build:
context: {{openproject_plugins_service}}
context: .
dockerfile: Dockerfile
services:

View File

@@ -9,7 +9,7 @@ ldap:
features:
matomo: true
css: true
portfolio_iframe: false
portfolio_iframe: false
ldap: true
central_database: true
oauth2: true

View File

@@ -2,7 +2,8 @@ application_id: "openproject"
docker_repository_address: "https://github.com/opf/openproject-deploy"
database_type: "postgres"
openproject_plugins_service: "{{docker_compose.directories.services}}plugins/"
openproject_plugins_folder: "{{docker_compose.directories.volumes}}plugins/"
custom_openproject_image: "custom_openproject"
# The following volume doesn't have a practcical function. It just exist to prevent the creation of unnecessary anonymous volumes
@@ -23,4 +24,4 @@ openproject_filters:
users: >-
{{ '(memberOf=cn=openproject-users,' ~ ldap.dn.application_roles ~ ')'
if applications[application_id].ldap.filters.users else '' }}
if applications[application_id].ldap.filters.users else '' }}