Optimized and refactored portfolio for flock.town

This commit is contained in:
2025-02-19 16:26:32 +01:00
parent 0c7af2ce89
commit e10deb9e54
24 changed files with 587 additions and 103 deletions

View File

@@ -1,22 +1,8 @@
# README.md for Docker OpenProject Role
# OpenProject Role
## Overview
This role is designed to deploy the OpenProject application using Docker. It includes tasks for setting up the environment, pulling the Docker repository, and configuring a reverse proxy with Nginx.
## Requirements
- Ansible
- Docker
- Docker Compose
- Access to the GitHub repository "opf/openproject-deploy"
## Role Variables
The role uses several variables, defined in `vars/main.yml`:
- `repository_directory`: The directory for the OpenProject repository.
- `docker_compose.directories.instance`: Directory for Docker Compose instances.
This role is designed to deploy the [OpenProject](https://www.openproject.org/) application using Docker. It includes tasks for setting up the environment, pulling the Docker repository, and configuring a reverse proxy with Nginx. It was developed by [Kevin Veen-Birkenbach](https://www.veen.world/)
## Handlers
@@ -32,14 +18,6 @@ Outlined in `tasks/main.yml`, the role includes tasks for:
- Warning if the repository is not reachable.
- Copying the `.env` file from a template.
## Templates
`env.j2` in `templates/` folder is a Jinja2 template for the `.env` file, setting up environment variables for the OpenProject container.
## Dependencies
This role depends on `nginx-docker-reverse-proxy`, as defined in `meta/main.yml`.
## Usage
To use this role, include it in your Ansible playbook and set the necessary variables, especially those required in the `.env` file template.

View File

@@ -3,14 +3,6 @@
command:
cmd: docker build --no-cache -t {{custom_openproject_image}} .
chdir: "{{openproject_plugins_service}}"
environment:
COMPOSE_HTTP_TIMEOUT: 600
DOCKER_CLIENT_TIMEOUT: 600
- name: rebuild openproject repository
command:
cmd: docker compose build
chdir: "{{openproject_repository_service}}"
environment:
COMPOSE_HTTP_TIMEOUT: 600
DOCKER_CLIENT_TIMEOUT: 600

View File

@@ -7,12 +7,6 @@
include_role:
name: nginx-domain-setup
#- name: "include tasks update-repository-with-files.yml"
# include_tasks: update-repository-with-files.yml
# vars:
# detached_files:
# - "docker-compose.yml"
- name: "Create {{openproject_plugins_service}}"
file:
path: "{{openproject_plugins_service}}"
@@ -35,15 +29,9 @@
- docker compose project setup
- rebuild custom openproject docker image
- name: pull docker repository
git:
repo: "{{ repository_address }}"
dest: "{{ openproject_repository_service }}"
update: yes
notify:
- docker compose project setup
- rebuild openproject repository
become: true
- name: "include role docker-repository-setup for {{application_id}}"
include_role:
name: docker-repository-setup
- name: "create {{dummy_volume}}"
file:

View File

@@ -1,12 +1,10 @@
application_id: "openproject"
repository_address: "https://github.com/opf/openproject-deploy"
database_password: "{{openproject_database_password}}"
database_type: "postgres"
openproject_plugins_service: "{{docker_compose.directories.services}}plugins/"
openproject_repository_service: "{{docker_compose.directories.services}}repository/"
custom_openproject_image: "custom_openproject"
application_id: "openproject"
docker_repository_address: "https://github.com/opf/openproject-deploy"
database_password: "{{openproject_database_password}}"
database_type: "postgres"
openproject_plugins_service: "{{docker_compose.directories.services}}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
dummy_volume: "{{docker_compose.directories.volumes}}dummy_volume"
dummy_volume: "{{docker_compose.directories.volumes}}dummy_volume"