mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Implemented helper role docker-central-database and refactored code
This commit is contained in:
@@ -16,7 +16,7 @@ This role is designed to deploy the OpenProject application using Docker. It inc
|
||||
The role uses several variables, defined in `vars/main.yml`:
|
||||
|
||||
- `repository_directory`: The directory for the OpenProject repository.
|
||||
- `docker_compose_instance_directory`: Directory for Docker Compose instances.
|
||||
- `docker_compose.directories.instance`: Directory for Docker Compose instances.
|
||||
|
||||
## Handlers
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
- name: rebuild docker image
|
||||
command:
|
||||
cmd: docker build --no-cache -t custom_openproject .
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
chdir: "{{docker_compose.directories.instance}}"
|
||||
environment:
|
||||
COMPOSE_HTTP_TIMEOUT: 600
|
||||
DOCKER_CLIENT_TIMEOUT: 600
|
@@ -1,6 +1,7 @@
|
||||
---
|
||||
- name: "include docker/compose/database.yml"
|
||||
include_tasks: docker/compose/database.yml
|
||||
- name: "include docker-central-database"
|
||||
include_role:
|
||||
name: docker-central-database
|
||||
|
||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||
include_tasks: nginx-docker-proxy-domain.yml
|
||||
@@ -8,18 +9,18 @@
|
||||
- name: "include tasks update-repository-with-docker-compose.yml"
|
||||
include_tasks: update-repository-with-docker-compose.yml
|
||||
|
||||
- name: "Transfering Gemfile.plugins to {{docker_compose_instance_directory}}"
|
||||
- name: "Transfering Gemfile.plugins to {{docker_compose.directories.instance}}"
|
||||
copy:
|
||||
src: Gemfile.plugins
|
||||
dest: "{{docker_compose_instance_directory}}Gemfile.plugins"
|
||||
dest: "{{docker_compose.directories.instance}}Gemfile.plugins"
|
||||
notify:
|
||||
- docker compose project setup
|
||||
- rebuild docker image
|
||||
|
||||
- name: "Transfering Dockerfile to {{docker_compose_instance_directory}}"
|
||||
- name: "Transfering Dockerfile to {{docker_compose.directories.instance}}"
|
||||
copy:
|
||||
src: Dockerfile
|
||||
dest: "{{docker_compose_instance_directory}}Dockerfile"
|
||||
dest: "{{docker_compose.directories.instance}}Dockerfile"
|
||||
notify:
|
||||
- docker compose project setup
|
||||
- rebuild docker image
|
||||
@@ -33,5 +34,5 @@
|
||||
- name: "copy .env"
|
||||
template:
|
||||
src: env.j2
|
||||
dest: "{{ docker_compose_instance_directory }}.env"
|
||||
dest: "{{ docker_compose.directories.instance }}.env"
|
||||
notify: docker compose project setup
|
||||
|
@@ -20,7 +20,7 @@ x-op-app: &app
|
||||
|
||||
services:
|
||||
|
||||
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
|
||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
||||
|
||||
{% include 'roles/docker-oauth2-proxy/templates/container.yml.j2' %}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
application_id: "openproject"
|
||||
repository_directory: "{{ path_docker_compose_instances }}{{application_id}}/"
|
||||
docker_compose_instance_directory: "{{repository_directory}}compose/"
|
||||
docker_compose.directories.instance: "{{repository_directory}}compose/"
|
||||
repository_address: "https://github.com/opf/openproject-deploy"
|
||||
database_password: "{{openproject_database_password}}"
|
||||
database_type: "postgres"
|
||||
|
Reference in New Issue
Block a user