Compare commits

...

2 Commits

Author SHA1 Message Date
a0d6f79279 solved variable bugs 2023-12-22 17:36:35 +01:00
925ad35da3 implemented draft for openproject 2023-12-22 15:49:55 +01:00
10 changed files with 172 additions and 43 deletions

View File

@ -1,3 +1,7 @@
# General
verbose: false # Prints well formated debug information
top_domain: "localhost"
# Server Tact Variables # Server Tact Variables
## Ours in which the server is 100% working. Rest of the time is reserved for maintanance ## Ours in which the server is 100% working. Rest of the time is reserved for maintanance
@ -89,21 +93,6 @@ nginx_servers_directory: "{{nginx_configuration_directory}}servers/"
nginx_maps_directory: "{{nginx_configuration_directory}}maps/" # Contains mappins nginx_maps_directory: "{{nginx_configuration_directory}}maps/" # Contains mappins
nginx_upstreams_directory: "{{nginx_configuration_directory}}upstreams/" # Contains upstream configurations nginx_upstreams_directory: "{{nginx_configuration_directory}}upstreams/" # Contains upstream configurations
# Routing Configurations for Domain Redirections
redirect_domain_mappings:
- { source: "nextcloud.{{top_domain}}", target: "cloud.{{top_domain}}" }
- { source: "gitea.{{top_domain}}", target: "git.{{top_domain}}" }
- { source: "listmonk.{{top_domain}}", target: "newsletter.{{top_domain}}" }
- { source: "discourse.{{top_domain}}", target: "forum.{{top_domain}}" }
- { source: "bbb.{{top_domain}}", target: "meet.{{top_domain}}" }
- { source: "short.{{top_domain}}", target: "s.{{top_domain}}" }
- { source: "mastodon.{{top_domain}}", target: "microblog.{{top_domain}}" }
- { source: "peertube.{{top_domain}}", target: "video.{{top_domain}}" }
- { source: "videos.{{top_domain}}", target: "video.{{top_domain}}" }
- { source: "funkwhale.{{top_domain}}", target: "music.{{top_domain}}" }
- { source: "pixelfed.{{top_domain}}", target: "picture.{{top_domain}}" }
- { source: "pictures.{{top_domain}}", target: "picture.{{top_domain}}" }
## Docker Applications ## Docker Applications
### Domain Names for Various Services ### Domain Names for Various Services
@ -129,21 +118,41 @@ domains_peertube: []
domain_roulette: "roulette.{{top_domain}}" domain_roulette: "roulette.{{top_domain}}"
domain_attendize: "tickets.{{top_domain}}" domain_attendize: "tickets.{{top_domain}}"
domain_yourls: "s.{{top_domain}}" domain_yourls: "s.{{top_domain}}"
domain_openproject: "project.{{top_domain}}"
### Software Versions for Specific Applications ### Docker Role Specific Parameters
version_nextcloud: "production" # Danger: Nextcloud can't skipp major version updates.
version_mailu: "2.0"
version_akaunting: "latest"
version_mastodon: "latest"
### Role specific configuration #### Pixelfed
pixelfed_app_name: "Pictures" pixelfed_app_name: "Pictures"
top_domain: "localhost" #### Matrix
# Prints well formated debug information
verbose: false
# Matrix configuration
matrix_playbook_tags: "setup-all,start" # For the initial update use: install-all,ensure-matrix-users-created,start matrix_playbook_tags: "setup-all,start" # For the initial update use: install-all,ensure-matrix-users-created,start
matrix_role: "ansible" # Role to setup Matrix. Valid values: ansible, compose matrix_role: "ansible" # Role to setup Matrix. Valid values: ansible, compose
#### Mastodon
version_mastodon: "latest"
#### Akaunting
version_akaunting: "latest"
#### Mailu
version_mailu: "2.0"
#### Nextcloud
version_nextcloud: "production" # Danger: Nextcloud can't skipp major version updates.
# Routing Configurations for Domain Redirections
redirect_domain_mappings:
- { source: "bbb.{{top_domain}}", target: "{{domain_bigbluebutton}}" }
- { source: "discourse.{{top_domain}}", target: "{{domain_discourse}}" }
- { source: "funkwhale.{{top_domain}}", target: "{{domain_funkwhale}}" }
- { source: "gitea.{{top_domain}}", target: "{{domain_gitea}}" }
- { source: "listmonk.{{top_domain}}", target: "{{domain_listmonk}}" }
- { source: "mastodon.{{top_domain}}", target: "{{domain_mastodon}}" }
- { source: "nextcloud.{{top_domain}}", target: "{{domain_nextcloud}}" }
- { source: "openproject.{{top_domain}}", target: "{{domain_openproject}}" }
- { source: "peertube.{{top_domain}}", target: "{{domain_peertube}}" }
- { source: "pictures.{{top_domain}}", target: "{{domain_pixelfed}}" }
- { source: "pixelfed.{{top_domain}}", target: "{{domain_pixelfed}}" }
- { source: "short.{{top_domain}}", target: "{{domain_yourls}}" }
- { source: "videos.{{top_domain}}", target: "{{domain_peertube}}" }

View File

@ -1,13 +1,16 @@
# Docker Akaunting Setup Guide # Docker Akaunting Setup Guide
## !!!DANGER!!!
**AKAUNTING CONTAINS VERY MUCH PROPERITARY COMPONENTS. IT IS ALMOST IMPOSSIBLE TO USE THIS SOFTWARE FOR FREE IN A PRODUCTIVE ENVIRONMENT. UPDATES MAY BREAK YOUR INSTALLATION. IN THE PAST UPDATES LEADED TO THE REDUCTION OF FREE FEATURES AND INSTEAD THEY BECOME PAYD FEATURES. THIS LEADED TO THAT USERS COULD NOT MAINTAINE THERE COMPANIES IN AKAUNTING ANYMORE**
I recommend to use instead [Open Project](../docker-openproject/) and/or [GNUCash](../pc-gnucash/).
This role still exist in case, that you want to setup Akaunting and you're willing to pay, but I recommend to don't use akaunting.
## Introduction ## Introduction
This guide details the process of setting up Akaunting, a free and online accounting software, using Docker. It's tailored to help you deploy and manage an Akaunting instance efficiently using Docker and Docker Compose. This guide details the process of setting up Akaunting, a free and online accounting software, using Docker. It's tailored to help you deploy and manage an Akaunting instance efficiently using Docker and Docker Compose.
## Better Alternatives to Akaunting
Due to license issues, bugs and that in the past after an akaunting update your functions get reduced, I recommend the use of other finance software.
[GNUCASH](https://www.gnucash.org/) offers more functions for SMB's, allows tracking of bank and trading accounts and in combination with Nextcloud it's a very good tool for smal companies to manage there finances.
## Prerequisites ## Prerequisites
- Docker and Docker Compose installed. - Docker and Docker Compose installed.
- Basic understanding of Docker concepts. - Basic understanding of Docker concepts.

View File

@ -52,7 +52,7 @@ devture_traefik_config_certificatesResolvers_acme_email: "{{administrator_email}
# #
# The playbook creates additional Postgres users and databases (one for each enabled service) # The playbook creates additional Postgres users and databases (one for each enabled service)
# using this superuser account. # using this superuser account.
devture_postgres_connection_password: "{{matrix_postgres_password}}" devture_postgres_connection_password: "{{matrix_database_password}}"
# By default, we configure Coturn's external IP address using the value specified for `ansible_host` in your `inventory/hosts` file. # By default, we configure Coturn's external IP address using the value specified for `ansible_host` in your `inventory/hosts` file.
# If this value is an external IP address, you can skip this section. # If this value is an external IP address, you can skip this section.

View File

@ -0,0 +1,49 @@
# README.md for Docker 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_instance_directory`: Directory for Docker Compose instances.
## Handlers
Defined in `handlers/main.yml`, the handler `recreate openproject` is used for recreating the OpenProject instance with specific environment settings.
## Tasks
Outlined in `tasks/main.yml`, the role includes tasks for:
- Including Nginx Docker proxy domain tasks.
- Creating the repository directory.
- Pulling the OpenProject Docker repository.
- 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.
## Notes
Ensure that Docker and Docker Compose are installed and configured correctly on the target machine. Also, ensure that the necessary ports are open and accessible.

View File

@ -0,0 +1,8 @@
---
- name: recreate openproject
command:
cmd: docker-compose -p openproject up -d --force-recreate
chdir: "{{ docker_compose_instance_directory }}"
environment:
COMPOSE_HTTP_TIMEOUT: 600
DOCKER_CLIENT_TIMEOUT: 600

View File

@ -0,0 +1,2 @@
dependencies:
- nginx-docker-reverse-proxy

View File

@ -0,0 +1,30 @@
---
- name: "include tasks nginx-docker-proxy-domain.yml"
include_tasks: nginx-docker-proxy-domain.yml
- name: "create {{ repository_directory }}"
file:
path: "{{ repository_directory }}"
state: directory
mode: 0755
- name: pull docker repository
git:
repo: "https://github.com/opf/openproject-deploy"
dest: "{{repository_directory}}"
update: yes
notify: recreate openproject
become: true
register: git_result
ignore_errors: true
- name: Warn if repo is not reachable
debug:
msg: "Warning: Repository is not reachable."
when: git_result.failed
- name: "copy .env"
template:
src: env.j2
dest: "{{docker_compose_instance_directory}}.env"
notify: recreate openproject

View File

@ -0,0 +1,22 @@
##
# All environment variables defined here will only apply if you pass them
# to the OpenProject container in docker-compose.yml under x-op-app -> environment.
# For the examples here this is already the case.
#
# Please refer to our documentation to see all possible variables:
# https://www.openproject.org/docs/installation-and-operations/configuration/environment/
#
TAG=13
OPENPROJECT_HTTPS=true
OPENPROJECT_HOST__NAME={{domain}}
PORT=127.0.0.1:{{http_port}}
OPENPROJECT_RAILS__RELATIVE__URL__ROOT=
IMAP_ENABLED=false
POSTGRES_PASSWORD="{{ openproject_database_password }}"
DATABASE_URL="postgres://postgres:{{ openproject_database_password }}@db/openproject?pool=20&encoding=unicode&reconnect=true"
RAILS_MIN_THREADS=4
RAILS_MAX_THREADS=16
# The following volumes are default
# PGDATA="pgdata"
# OPDATA="opdata"

View File

@ -0,0 +1,2 @@
repository_directory: "{{ path_docker_compose_instances }}openproject/"
docker_compose_instance_directory: "{{repository_directory}}compose/"

View File

@ -199,7 +199,7 @@
domains: "{{domains_discourse}}" domains: "{{domains_discourse}}"
http_port: 8020 http_port: 8020
- name: setup matrix via ansible - name: setup matrix
hosts: matrix hosts: matrix
become: true become: true
roles: roles:
@ -211,19 +211,23 @@
element_domain: "{{domain_matrix_element}}" element_domain: "{{domain_matrix_element}}"
synapse_domain: "{{domain_matrix_synapse}}" synapse_domain: "{{domain_matrix_synapse}}"
http_port: 8021 http_port: 8021
when: matrix_role == 'ansible' when: matrix_role == 'ansible'
- name: setup matrix via docker compose
hosts: matrix
become: true
roles:
- role: docker-matrix-compose - role: docker-matrix-compose
vars: vars:
element_domain: "{{domain_matrix_element}}" element_domain: "{{domain_matrix_element}}"
synapse_domain: "{{domain_matrix_synapse}}" synapse_domain: "{{domain_matrix_synapse}}"
synapse_http_port: 8021 synapse_http_port: 8021
element_http_port: 8022 element_http_port: 8022
when: matrix_role == 'docker' when: matrix_role == 'compose'
- name: setup open project instances
hosts: openproject
become: true
roles:
- role: docker-openproject
vars:
domain: "{{domain_openproject}}"
http_port: 8023
- name: setup akaunting hosts - name: setup akaunting hosts
hosts: akaunting hosts: akaunting