mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-09 11:47:14 +02:00
Compare commits
14 Commits
2ea7a606b6
...
a7b9467304
Author | SHA1 | Date | |
---|---|---|---|
a7b9467304 | |||
8200abad85 | |||
3f87f1fcd8 | |||
63af5b8ef6 | |||
a51bc1f4c7 | |||
b9e5c3a337 | |||
75d603db5b | |||
a1465ef886 | |||
eccace60f4 | |||
634f1835fc | |||
9762de2901 | |||
e25565c517 | |||
ca0602a1c8 | |||
38ed1e94e8 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,4 +1,5 @@
|
|||||||
site.retry
|
site.retry
|
||||||
*__pycache__
|
*__pycache__
|
||||||
venv
|
venv
|
||||||
*.log
|
*.log
|
||||||
|
*.bak
|
@@ -2,143 +2,162 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import yaml
|
import sys
|
||||||
import ipaddress
|
import ipaddress
|
||||||
|
import difflib
|
||||||
from jinja2 import Environment, FileSystemLoader
|
from jinja2 import Environment, FileSystemLoader
|
||||||
|
from ruamel.yaml import YAML
|
||||||
|
|
||||||
# Paths to the group-vars files
|
# Paths to the group-vars files
|
||||||
PORTS_FILE = './group_vars/all/09_ports.yml'
|
PORTS_FILE = './group_vars/all/09_ports.yml'
|
||||||
NETWORKS_FILE = './group_vars/all/10_networks.yml'
|
NETWORKS_FILE = './group_vars/all/10_networks.yml'
|
||||||
ROLE_TEMPLATE_DIR = './docker-template'
|
ROLE_TEMPLATE_DIR = './templates/docker_role'
|
||||||
ROLES_DIR = './roles'
|
ROLES_DIR = './roles'
|
||||||
|
|
||||||
|
yaml = YAML()
|
||||||
|
yaml.preserve_quotes = True
|
||||||
|
|
||||||
def load_yaml(path):
|
|
||||||
|
def load_yaml_with_comments(path):
|
||||||
with open(path) as f:
|
with open(path) as f:
|
||||||
return yaml.safe_load(f)
|
return yaml.load(f)
|
||||||
|
|
||||||
|
|
||||||
def dump_yaml(data, path):
|
def dump_yaml_with_comments(data, path):
|
||||||
with open(path, 'w') as f:
|
with open(path, 'w') as f:
|
||||||
yaml.safe_dump(data, f, sort_keys=False)
|
yaml.dump(data, f)
|
||||||
|
|
||||||
|
|
||||||
def get_next_network(networks_dict, prefixlen):
|
def get_next_network(networks_dict, prefixlen):
|
||||||
# Collect all local subnets matching the given prefix length
|
"""Select the next contiguous subnet, based on the highest existing subnet + one network offset."""
|
||||||
nets = []
|
nets = []
|
||||||
for name, info in networks_dict['defaults_networks']['local'].items():
|
local = networks_dict['defaults_networks']['local']
|
||||||
|
for name, info in local.items():
|
||||||
|
# info is a dict with 'subnet' key
|
||||||
net = ipaddress.ip_network(info['subnet'])
|
net = ipaddress.ip_network(info['subnet'])
|
||||||
if net.prefixlen == prefixlen:
|
if net.prefixlen == prefixlen:
|
||||||
nets.append(net)
|
nets.append(net)
|
||||||
# Sort by network address and return the first one
|
if not nets:
|
||||||
|
raise RuntimeError(f"No existing /{prefixlen} subnets to base allocation on.")
|
||||||
nets.sort(key=lambda n: int(n.network_address))
|
nets.sort(key=lambda n: int(n.network_address))
|
||||||
return nets[0]
|
last = nets[-1]
|
||||||
|
offset = last.num_addresses
|
||||||
|
next_net = ipaddress.ip_network((int(last.network_address) + offset, prefixlen))
|
||||||
|
return next_net
|
||||||
|
|
||||||
|
|
||||||
def get_next_port(ports_dict, category, service):
|
def get_next_port(ports_dict, category):
|
||||||
used = set()
|
"""Assign the next port by taking the max existing plus one."""
|
||||||
# Gather already taken ports under localhost.category
|
loc = ports_dict['ports']['localhost'][category]
|
||||||
for svc, port in ports_dict['ports']['localhost'].get(category, {}).items():
|
existing = [int(v) for v in loc.values()]
|
||||||
used.add(int(port))
|
return (max(existing) + 1) if existing else 1
|
||||||
# Start searching from port 1 upwards
|
|
||||||
candidate = 1
|
|
||||||
while candidate in used:
|
|
||||||
candidate += 1
|
|
||||||
return candidate
|
|
||||||
|
|
||||||
|
|
||||||
def render_template(src_dir, dst_dir, context):
|
def prompt_conflict(dst_file):
|
||||||
env = Environment(
|
print(f"Conflict detected: {dst_file}")
|
||||||
loader=FileSystemLoader(src_dir),
|
print("[1] overwrite, [2] skip, [3] merge")
|
||||||
keep_trailing_newline=True,
|
choice = None
|
||||||
autoescape=False,
|
while choice not in ('1', '2', '3'):
|
||||||
)
|
choice = input("Enter 1, 2, or 3: ").strip()
|
||||||
|
return choice
|
||||||
|
|
||||||
|
|
||||||
|
def render_templates(src_dir, dst_dir, context):
|
||||||
|
env = Environment(loader=FileSystemLoader(src_dir), keep_trailing_newline=True, autoescape=False)
|
||||||
|
env.filters['bool'] = lambda x: bool(x)
|
||||||
|
|
||||||
for root, _, files in os.walk(src_dir):
|
for root, _, files in os.walk(src_dir):
|
||||||
rel_path = os.path.relpath(root, src_dir)
|
rel = os.path.relpath(root, src_dir)
|
||||||
target_path = os.path.join(dst_dir, rel_path)
|
target = os.path.join(dst_dir, rel)
|
||||||
os.makedirs(target_path, exist_ok=True)
|
os.makedirs(target, exist_ok=True)
|
||||||
for filename in files:
|
for fn in files:
|
||||||
template = env.get_template(os.path.join(rel_path, filename))
|
tpl = env.get_template(os.path.join(rel, fn))
|
||||||
rendered = template.render(**context)
|
rendered = tpl.render(**context)
|
||||||
out_name = filename[:-3] if filename.endswith('.j2') else filename
|
out = fn[:-3] if fn.endswith('.j2') else fn
|
||||||
with open(os.path.join(target_path, out_name), 'w') as f:
|
dst_file = os.path.join(target, out)
|
||||||
f.write(rendered)
|
|
||||||
|
if os.path.exists(dst_file):
|
||||||
|
choice = prompt_conflict(dst_file)
|
||||||
|
if choice == '2':
|
||||||
|
print(f"Skipping {dst_file}")
|
||||||
|
continue
|
||||||
|
if choice == '3':
|
||||||
|
with open(dst_file) as f_old:
|
||||||
|
old_lines = f_old.readlines()
|
||||||
|
new_lines = rendered.splitlines(keepends=True)
|
||||||
|
additions = [l for l in new_lines if l not in old_lines]
|
||||||
|
if additions:
|
||||||
|
with open(dst_file, 'a') as f:
|
||||||
|
f.writelines(additions)
|
||||||
|
print(f"Merged {len(additions)} lines into {dst_file}")
|
||||||
|
else:
|
||||||
|
print(f"No new lines to merge into {dst_file}")
|
||||||
|
continue
|
||||||
|
# overwrite
|
||||||
|
print(f"Overwriting {dst_file}")
|
||||||
|
with open(dst_file, 'w') as f:
|
||||||
|
f.write(rendered)
|
||||||
|
else:
|
||||||
|
# create new file
|
||||||
|
with open(dst_file, 'w') as f:
|
||||||
|
f.write(rendered)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
# Load dynamic port categories
|
||||||
|
ports_data = load_yaml_with_comments(PORTS_FILE)
|
||||||
|
categories = list(ports_data['ports']['localhost'].keys())
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description="Create a Docker Ansible role with Jinja2 templates, and assign network and ports"
|
description="Create or update a Docker Ansible role, and globally assign network and ports with comments preserved"
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
'--application-id', '-a', required=True,
|
|
||||||
help="Unique ID of the application (used in the role name)"
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
'--network', '-n', choices=['24', '28'], required=True,
|
|
||||||
help="Network prefix length to assign (/24 or /28)"
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
'--ports', '-p', nargs='+', metavar="CATEGORY.SERVICE", required=True,
|
|
||||||
help="List of ports in the format category.service (e.g. http.nextcloud)"
|
|
||||||
)
|
)
|
||||||
|
parser.add_argument('-a', '--application-id', required=True, help="Unique application ID")
|
||||||
|
parser.add_argument('-n', '--network', choices=['24', '28'], required=True, help="Network prefix length (/24 or /28)")
|
||||||
|
parser.add_argument('-p', '--ports', nargs='+', choices=categories, required=True, help=f"Port categories to assign (allowed: {', '.join(categories)})")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
app_id = args.application_id
|
app = args.application_id
|
||||||
role_name = f"docker-{app_id}"
|
role = f"docker-{app}"
|
||||||
|
role_dir = os.path.join(ROLES_DIR, role)
|
||||||
|
|
||||||
# 1) Create the role from the template
|
|
||||||
role_dir = os.path.join(ROLES_DIR, role_name)
|
|
||||||
if os.path.exists(role_dir):
|
if os.path.exists(role_dir):
|
||||||
parser.error(f"Role {role_name} already exists at {role_dir}")
|
if input(f"Role {role} exists. Continue? [y/N]: ").strip().lower() != 'y':
|
||||||
render_template(ROLE_TEMPLATE_DIR, role_dir, {
|
print("Aborting.")
|
||||||
'application_id': app_id,
|
sys.exit(1)
|
||||||
'role_name': role_name,
|
else:
|
||||||
})
|
os.makedirs(role_dir)
|
||||||
print(f"→ Role {role_name} created at {role_dir}")
|
|
||||||
|
|
||||||
# 2) Assign network
|
# 1) Render all templates with conflict handling
|
||||||
networks = load_yaml(NETWORKS_FILE)
|
render_templates(ROLE_TEMPLATE_DIR, role_dir, {'application_id': app, 'role_name': role, 'database_type': 0})
|
||||||
|
print(f"→ Templates applied to {role_dir}")
|
||||||
|
|
||||||
|
# 2) Update global networks file, preserving comments
|
||||||
|
networks = load_yaml_with_comments(NETWORKS_FILE)
|
||||||
prefix = int(args.network)
|
prefix = int(args.network)
|
||||||
chosen_net = get_next_network(networks, prefix)
|
new_net = get_next_network(networks, prefix)
|
||||||
out_net = {
|
networks['defaults_networks']['local'][app] = {'subnet': str(new_net)}
|
||||||
'defaults_networks': {
|
shutil.copy(NETWORKS_FILE, NETWORKS_FILE + '.bak')
|
||||||
'application': {
|
dump_yaml_with_comments(networks, NETWORKS_FILE)
|
||||||
app_id: str(chosen_net)
|
print(f"→ Assigned network {new_net} in {NETWORKS_FILE}")
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
net_file = f'./group_vars/{app_id}_network.yml'
|
|
||||||
dump_yaml(out_net, net_file)
|
|
||||||
print(f"→ Assigned network {chosen_net} (/{prefix}) and wrote to {net_file}")
|
|
||||||
|
|
||||||
# 3) Assign ports
|
# 3) Update global ports file, preserving comments
|
||||||
ports_yaml = load_yaml(PORTS_FILE)
|
ports_data = load_yaml_with_comments(PORTS_FILE)
|
||||||
assigned = {}
|
assigned = {}
|
||||||
for entry in args.ports:
|
for cat in args.ports:
|
||||||
try:
|
loc = ports_data['ports']['localhost'].setdefault(cat, {})
|
||||||
category, service = entry.split('.', 1)
|
if app in loc:
|
||||||
except ValueError:
|
print(f"→ Existing port for {cat} and {app}: {loc[app]}, skipping.")
|
||||||
parser.error(f"Invalid port spec: {entry}. Must be CATEGORY.SERVICE")
|
else:
|
||||||
port = get_next_port(ports_yaml, category, service)
|
pnum = get_next_port(ports_data, cat)
|
||||||
# Insert into the in-memory ports data under localhost
|
loc[app] = pnum
|
||||||
ports_yaml['ports']['localhost'].setdefault(category, {})[service] = port
|
assigned[cat] = pnum
|
||||||
assigned[entry] = port
|
|
||||||
|
|
||||||
# Backup and write updated all/09_ports.yml
|
|
||||||
backup_file = PORTS_FILE + '.bak'
|
|
||||||
shutil.copy(PORTS_FILE, backup_file)
|
|
||||||
dump_yaml(ports_yaml, PORTS_FILE)
|
|
||||||
print(f"→ Assigned ports: {assigned}. Updated {PORTS_FILE} (backup at {backup_file})")
|
|
||||||
|
|
||||||
# Also write ports to the application’s own vars file
|
|
||||||
out_ports = {'ports': {'localhost': {}}}
|
|
||||||
for entry, port in assigned.items():
|
|
||||||
category, service = entry.split('.', 1)
|
|
||||||
out_ports['ports']['localhost'].setdefault(category, {})[service] = port
|
|
||||||
ports_file = f'./group_vars/{app_id}_ports.yml'
|
|
||||||
dump_yaml(out_ports, ports_file)
|
|
||||||
print(f"→ Wrote assigned ports to {ports_file}")
|
|
||||||
|
|
||||||
|
if assigned:
|
||||||
|
shutil.copy(PORTS_FILE, PORTS_FILE + '.bak')
|
||||||
|
dump_yaml_with_comments(ports_data, PORTS_FILE)
|
||||||
|
print(f"→ Assigned ports {assigned} in {PORTS_FILE}")
|
||||||
|
else:
|
||||||
|
print("→ No new ports assigned.")
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
@@ -111,11 +111,6 @@ Now that you have defined the application settings, domain, and application ID,
|
|||||||
dockerfile: {{ path_cymais_my_service_output.stdout }}/Dockerfile
|
dockerfile: {{ path_cymais_my_service_output.stdout }}/Dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:5000"
|
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:5000"
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "curl", "-f", "http://127.0.0.1:5000"]
|
|
||||||
interval: 1m
|
|
||||||
timeout: 10s
|
|
||||||
retries: 3
|
|
||||||
volumes:
|
volumes:
|
||||||
- {{ path_cymais_my_service_output.stdout }}:/app
|
- {{ path_cymais_my_service_output.stdout }}:/app
|
||||||
- {{ path_cymais_output.stdout }}:/source
|
- {{ path_cymais_output.stdout }}:/source
|
||||||
|
@@ -3,74 +3,75 @@ ports:
|
|||||||
localhost:
|
localhost:
|
||||||
# https://developer.mozilla.org/de/docs/Web/API/WebSockets_API
|
# https://developer.mozilla.org/de/docs/Web/API/WebSockets_API
|
||||||
websocket:
|
websocket:
|
||||||
mastodon: 4001
|
mastodon: 4001
|
||||||
espocrm: 4002
|
espocrm: 4002
|
||||||
oauth2_proxy:
|
oauth2_proxy:
|
||||||
phpmyadmin: 4181
|
phpmyadmin: 4181
|
||||||
lam: 4182
|
lam: 4182
|
||||||
openproject: 4183
|
openproject: 4183
|
||||||
yourls: 4184
|
yourls: 4184
|
||||||
pgadmin: 4185
|
pgadmin: 4185
|
||||||
phpldapadmin: 4186
|
phpldapadmin: 4186
|
||||||
fusiondirectory: 4187
|
fusiondirectory: 4187
|
||||||
gitea: 4188
|
gitea: 4188
|
||||||
snipe-it: 4189
|
snipe-it: 4189
|
||||||
ldap:
|
ldap:
|
||||||
ldap: 389
|
ldap: 389
|
||||||
http:
|
http:
|
||||||
nextcloud: 8001
|
nextcloud: 8001
|
||||||
gitea: 8002
|
gitea: 8002
|
||||||
wordpress: 8003
|
wordpress: 8003
|
||||||
mediawiki: 8004
|
mediawiki: 8004
|
||||||
mybb: 8005
|
mybb: 8005
|
||||||
yourls: 8006
|
yourls: 8006
|
||||||
mailu: 8007
|
mailu: 8007
|
||||||
elk: 8008
|
elk: 8008
|
||||||
mastodon: 8009
|
mastodon: 8009
|
||||||
pixelfed: 8010
|
pixelfed: 8010
|
||||||
peertube: 8011
|
peertube: 8011
|
||||||
funkwhale: 8012
|
funkwhale: 8012
|
||||||
roulette-wheel: 8013
|
roulette-wheel: 8013
|
||||||
joomla: 8014
|
joomla: 8014
|
||||||
attendize: 8015
|
attendize: 8015
|
||||||
pgadmin: 8016
|
pgadmin: 8016
|
||||||
baserow: 8017
|
baserow: 8017
|
||||||
matomo: 8018
|
matomo: 8018
|
||||||
listmonk: 8019
|
listmonk: 8019
|
||||||
discourse: 8020
|
discourse: 8020
|
||||||
synapse: 8021
|
synapse: 8021
|
||||||
element: 8022
|
element: 8022
|
||||||
openproject: 8023
|
openproject: 8023
|
||||||
gitlab: 8024
|
gitlab: 8024
|
||||||
akaunting: 8025
|
akaunting: 8025
|
||||||
moodle: 8026
|
moodle: 8026
|
||||||
taiga: 8027
|
taiga: 8027
|
||||||
friendica: 8028
|
friendica: 8028
|
||||||
portfolio: 8029
|
portfolio: 8029
|
||||||
bluesky_api: 8030
|
bluesky_api: 8030
|
||||||
bluesky_web: 8031
|
bluesky_web: 8031
|
||||||
keycloak: 8032
|
keycloak: 8032
|
||||||
lam: 8033
|
lam: 8033
|
||||||
phpmyadmin: 8034
|
phpmyadmin: 8034
|
||||||
snipe-it: 8035
|
snipe-it: 8035
|
||||||
sphinx: 8036
|
sphinx: 8036
|
||||||
phpldapadmin: 8037
|
phpldapadmin: 8037
|
||||||
fusiondirectory: 8038
|
fusiondirectory: 8038
|
||||||
presentation: 8039
|
presentation: 8039
|
||||||
espocrm: 8040
|
espocrm: 8040
|
||||||
syncope: 8041
|
syncope: 8041
|
||||||
collabora: 8042
|
collabora: 8042
|
||||||
mobilizon: 8043
|
mobilizon: 8043
|
||||||
bigbluebutton: 48087 # This port is predefined by bbb. @todo Try to change this to a 8XXX port
|
simpleicons: 8044
|
||||||
|
bigbluebutton: 48087 # This port is predefined by bbb. @todo Try to change this to a 8XXX port
|
||||||
# Ports which are exposed to the World Wide Web
|
# Ports which are exposed to the World Wide Web
|
||||||
public:
|
public:
|
||||||
# The following ports should be changed to 22 on the subdomain via stream mapping
|
# The following ports should be changed to 22 on the subdomain via stream mapping
|
||||||
ssh:
|
ssh:
|
||||||
gitea: 2201
|
gitea: 2201
|
||||||
gitlab: 2202
|
gitlab: 2202
|
||||||
ldaps:
|
ldaps:
|
||||||
ldap: 636
|
ldap: 636
|
||||||
stun:
|
stun:
|
||||||
bigbluebutton: 3478 # Not sure if it's right placed here or if it should be moved to localhost section
|
bigbluebutton: 3478 # Not sure if it's right placed here or if it should be moved to localhost section
|
||||||
turn:
|
turn:
|
||||||
bigbluebutton: 5349 # Not sure if it's right placed here or if it should be moved to localhost section
|
bigbluebutton: 5349 # Not sure if it's right placed here or if it should be moved to localhost section
|
||||||
|
@@ -44,7 +44,7 @@ defaults_networks:
|
|||||||
subnet: 192.168.102.0/28
|
subnet: 192.168.102.0/28
|
||||||
mailu:
|
mailu:
|
||||||
# Use one of the last container ips for dns resolving so that it isn't used
|
# Use one of the last container ips for dns resolving so that it isn't used
|
||||||
dns: 192.168.102.29
|
dns: 192.168.102.29
|
||||||
subnet: 192.168.102.16/28
|
subnet: 192.168.102.16/28
|
||||||
moodle:
|
moodle:
|
||||||
subnet: 192.168.102.32/28
|
subnet: 192.168.102.32/28
|
||||||
@@ -86,7 +86,9 @@ defaults_networks:
|
|||||||
subnet: 192.168.103.80/28
|
subnet: 192.168.103.80/28
|
||||||
collabora:
|
collabora:
|
||||||
subnet: 192.168.103.96/28
|
subnet: 192.168.103.96/28
|
||||||
|
simpleicons:
|
||||||
|
subnet: 192.168.103.112/28
|
||||||
|
|
||||||
# /24 Networks / 254 Usable Clients
|
# /24 Networks / 254 Usable Clients
|
||||||
bigbluebutton:
|
bigbluebutton:
|
||||||
subnet: 10.7.7.0/24 # This variable does not have an impact. It's just there for documentation reasons, because this network is used in bbb
|
subnet: 10.7.7.0/24 # This variable does not have an impact. It's just there for documentation reasons, because this network is used in bbb
|
||||||
@@ -95,5 +97,4 @@ defaults_networks:
|
|||||||
mariadb:
|
mariadb:
|
||||||
subnet: 192.168.201.0/24
|
subnet: 192.168.201.0/24
|
||||||
central_ldap:
|
central_ldap:
|
||||||
subnet: 192.168.202.0/24
|
subnet: 192.168.202.0/24
|
||||||
|
|
@@ -1,10 +1,7 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
|
||||||
|
|
||||||
application:
|
application:
|
||||||
|
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
|
|
||||||
image: "{{ applications[application_id].images[application_id] }}"
|
image: "{{ applications[application_id].images[application_id] }}"
|
||||||
build:
|
build:
|
||||||
@@ -15,10 +12,10 @@ services:
|
|||||||
- data:/var/www/html
|
- data:/var/www/html
|
||||||
environment:
|
environment:
|
||||||
- AKAUNTING_SETUP
|
- AKAUNTING_SETUP
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
data:
|
data:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
@@ -12,4 +12,8 @@ credentials:
|
|||||||
domains:
|
domains:
|
||||||
canonical:
|
canonical:
|
||||||
- "accounting.{{ primary_domain }}"
|
- "accounting.{{ primary_domain }}"
|
||||||
|
docker:
|
||||||
|
services:
|
||||||
|
database:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
@@ -1,8 +1,4 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/services/redis.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
|
||||||
|
|
||||||
web:
|
web:
|
||||||
image: "{{ applications[application_id].images.web }}"
|
image: "{{ applications[application_id].images.web }}"
|
||||||
@@ -11,23 +7,23 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- .:/usr/share/nginx/html
|
- .:/usr/share/nginx/html
|
||||||
- .:/var/www
|
- .:/var/www
|
||||||
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
maildev:
|
maildev:
|
||||||
worker:
|
worker:
|
||||||
env_file:
|
env_file:
|
||||||
- ./.env
|
- ./.env
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
|
||||||
worker:
|
worker:
|
||||||
image: "{{ applications[application_id].images.worker }}"
|
image: "{{ applications[application_id].images.worker }}"
|
||||||
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
maildev:
|
maildev:
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
volumes:
|
volumes:
|
||||||
- .:/usr/share/nginx/html
|
- .:/usr/share/nginx/html
|
||||||
- .:/var/www
|
- .:/var/www
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
redis:
|
redis:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
@@ -7,7 +7,12 @@ features:
|
|||||||
css: true
|
css: true
|
||||||
portfolio_iframe: false
|
portfolio_iframe: false
|
||||||
central_database: true
|
central_database: true
|
||||||
|
docker:
|
||||||
|
services:
|
||||||
|
redis:
|
||||||
|
enabled: true
|
||||||
|
database:
|
||||||
|
enabled: true
|
||||||
domains:
|
domains:
|
||||||
canonical:
|
canonical:
|
||||||
- "tickets.{{ primary_domain }}"
|
- "tickets.{{ primary_domain }}"
|
@@ -1,22 +1,18 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/services/redis.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
|
||||||
|
|
||||||
application:
|
application:
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
image: "{{ applications[application_id].images.baserow }}"
|
image: "{{ applications[application_id].images.baserow }}"
|
||||||
container_name: baserow-application
|
container_name: baserow-application
|
||||||
volumes:
|
volumes:
|
||||||
- data:/baserow/data
|
- data:/baserow/data
|
||||||
ports:
|
ports:
|
||||||
- "{{ports.localhost.http[application_id]}}:80"
|
- "{{ports.localhost.http[application_id]}}:80"
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
data:
|
data:
|
||||||
redis:
|
redis:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
@@ -1,7 +1,13 @@
|
|||||||
images:
|
images:
|
||||||
baserow: "baserow/baserow:latest"
|
baserow: "baserow/baserow:latest"
|
||||||
features:
|
features:
|
||||||
matomo: true
|
matomo: true
|
||||||
css: true
|
css: true
|
||||||
portfolio_iframe: true
|
portfolio_iframe: true
|
||||||
central_database: true
|
central_database: true
|
||||||
|
docker:
|
||||||
|
services:
|
||||||
|
redis:
|
||||||
|
enabled: true
|
||||||
|
database:
|
||||||
|
enabled: true
|
@@ -1,18 +1,18 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
pds:
|
pds:
|
||||||
|
{% set container_port = 3000 %}
|
||||||
|
{% set container_healthcheck = 'xrpc/_health' %}
|
||||||
image: "{{ applications[application_id].images.pds }}"
|
image: "{{ applications[application_id].images.pds }}"
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
volumes:
|
volumes:
|
||||||
- pds_data:/opt/pds
|
- pds_data:/opt/pds
|
||||||
- {{pdsadmin_file_path}}:/usr/local/bin/pdsadmin:ro
|
- {{pdsadmin_file_path}}:/usr/local/bin/pdsadmin:ro
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ports.localhost.http.bluesky_api}}:3000"
|
- "127.0.0.1:{{ports.localhost.http.bluesky_api}}:{{ container_port }}"
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "wget", "--spider", "http://127.0.0.1:3000/xrpc/_health"]
|
{% include 'roles/docker-container/templates/healthcheck/wget.yml.j2' %}
|
||||||
interval: 1m
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
timeout: 10s
|
|
||||||
retries: 3
|
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
|
||||||
|
|
||||||
# Deactivated for the moment @see https://github.com/bluesky-social/social-app
|
# Deactivated for the moment @see https://github.com/bluesky-social/social-app
|
||||||
web:
|
web:
|
||||||
@@ -33,9 +33,9 @@ services:
|
|||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
pds_data:
|
pds_data:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
@@ -11,4 +11,8 @@ features:
|
|||||||
domains:
|
domains:
|
||||||
canonical:
|
canonical:
|
||||||
web: "bskyweb.{{ primary_domain }}"
|
web: "bskyweb.{{ primary_domain }}"
|
||||||
api: "bluesky.{{ primary_domain }}"
|
api: "bluesky.{{ primary_domain }}"
|
||||||
|
docker:
|
||||||
|
services:
|
||||||
|
database:
|
||||||
|
enabled: true
|
@@ -0,0 +1 @@
|
|||||||
|
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
@@ -1,6 +1,4 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/services/redis.yml.j2' %}
|
|
||||||
|
|
||||||
collabora:
|
collabora:
|
||||||
image: collabora/code
|
image: collabora/code
|
||||||
@@ -8,8 +6,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
|
- "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
|
||||||
|
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
||||||
|
@@ -1,3 +1,9 @@
|
|||||||
domains:
|
domains:
|
||||||
canonical:
|
canonical:
|
||||||
- "collabora.{{ primary_domain }}"
|
- "collabora.{{ primary_domain }}"
|
||||||
|
docker:
|
||||||
|
services:
|
||||||
|
redis:
|
||||||
|
enabled: true
|
||||||
|
database:
|
||||||
|
enabled: false # May this is wrong. Just set during refactoring
|
15
roles/docker-compose/templates/base.yml.j2
Normal file
15
roles/docker-compose/templates/base.yml.j2
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{# Base template for all docker-compose.yml.j2 #}
|
||||||
|
services:
|
||||||
|
{# Load Database #}
|
||||||
|
{% if applications[application_id].docker.database.enabled | default(false) | bool %}
|
||||||
|
{% include 'roles/docker-central-database/templates/services/main.yml.j2' %}
|
||||||
|
{% endif %}
|
||||||
|
{# Load Redis #}
|
||||||
|
{% if applications[application_id].docker.redis.enabled | default(false) | bool %}
|
||||||
|
{% include 'roles/docker-redis/templates/service.yml.j2' %}
|
||||||
|
{% endif %}
|
||||||
|
{# Load OAuth2 Proxy #}
|
||||||
|
{% if not applications | is_feature_enabled('oauth2',application_id) %}
|
||||||
|
{% include 'roles/docker-oauth2-proxy/templates/container.yml.j2' %}
|
||||||
|
{% endif %}
|
||||||
|
{{ "\n" }}
|
49
roles/docker-container/README.md
Normal file
49
roles/docker-container/README.md
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
# Role: docker-container
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
This Ansible role supplies common Jinja2 snippets for composing Docker services consistently. Rather than repeating the same YAML blocks, you include one or more of the provided templates in your `docker-compose.yml.j2`.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
The following templates are available under `roles/docker-container/templates/`:
|
||||||
|
|
||||||
|
- **base.yml.j2**
|
||||||
|
Common service settings: `restart`, `env_file`, `logging`.
|
||||||
|
|
||||||
|
- **networks.yml.j2**
|
||||||
|
Conditional network attachments:
|
||||||
|
- `central_<database_type>` when `central_database` feature is enabled
|
||||||
|
- `central_ldap` when LDAP feature and network are enabled
|
||||||
|
- `default`
|
||||||
|
|
||||||
|
- **depends_on_dmbs.j2**
|
||||||
|
Builds a `depends_on:` block automatically:
|
||||||
|
- If `central_database` is **off**, renders an empty list `depends_on: []`
|
||||||
|
- Otherwise, includes `database` and/or `redis` with healthcheck conditions
|
||||||
|
|
||||||
|
- **healthcheck/**
|
||||||
|
Four strategies:
|
||||||
|
- `curl.yml.j2` (HTTP via `curl -f`)
|
||||||
|
- `wget.yml.j2` (HTTP via `wget --spider`)
|
||||||
|
- `tcp.yml.j2` (TCP socket test)
|
||||||
|
- `msmtp_curl.yml.j2` (SMTP first, then HTTP via `curl`; avoids duplicate emails)
|
||||||
|
|
||||||
|
Include whichever snippets your service requires to keep your Compose files DRY and maintainable.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- **Modular templates**
|
||||||
|
Mix only the blocks you need.
|
||||||
|
|
||||||
|
- **Feature‐driven logic**
|
||||||
|
Networks and dependencies adjust automatically based on your `applications` variables.
|
||||||
|
|
||||||
|
- **Multiple healthcheck options**
|
||||||
|
Pick the probe that works best for your container’s protocol and requirements.
|
||||||
|
|
||||||
|
## Further Resources
|
||||||
|
|
||||||
|
- [Docker Compose file reference](https://docs.docker.com/compose/compose-file/)
|
||||||
|
- [Ansible variable precedence](https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#understanding-variable-precedence)
|
||||||
|
- [Jinja2 templating guide](https://jinja.palletsprojects.com/)
|
18
roles/docker-container/templates/depends_on_dmbs.j2
Normal file
18
roles/docker-container/templates/depends_on_dmbs.j2
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{# This template needs to be included in docker-compose.yml containers, which depend on a database, redis and optional additional volumes #}
|
||||||
|
{% if applications | is_feature_enabled('central_database', application_id)
|
||||||
|
and not (applications[application_id].docker.redis.enabled
|
||||||
|
| default(false)
|
||||||
|
| bool) %}
|
||||||
|
depends_on: []
|
||||||
|
{% else %}
|
||||||
|
depends_on:
|
||||||
|
{% if not applications | is_feature_enabled('central_database', application_id) %}
|
||||||
|
database:
|
||||||
|
condition: service_healthy
|
||||||
|
{% endif %}
|
||||||
|
{% if applications[application_id].docker.redis.enabled | default(false) | bool %}
|
||||||
|
redis:
|
||||||
|
condition: service_healthy
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{{ "\n" }}
|
10
roles/docker-container/templates/healthcheck/curl.yml.j2
Normal file
10
roles/docker-container/templates/healthcheck/curl.yml.j2
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
healthcheck:
|
||||||
|
test:
|
||||||
|
- "CMD"
|
||||||
|
- "curl"
|
||||||
|
- "-f"
|
||||||
|
- "http://127.0.0.1{{ (":" ~ container_port) if container_port is defined else '' }}/{{ container_healthcheck | default('') }}"
|
||||||
|
interval: 1m
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
|
{{ "\n" }}
|
@@ -22,3 +22,4 @@
|
|||||||
interval: 1m
|
interval: 1m
|
||||||
timeout: 20s
|
timeout: 20s
|
||||||
retries: 3
|
retries: 3
|
||||||
|
{{ "\n" }}
|
7
roles/docker-container/templates/healthcheck/tcp.yml.j2
Normal file
7
roles/docker-container/templates/healthcheck/tcp.yml.j2
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
healthcheck:
|
||||||
|
test:
|
||||||
|
- "CMD"
|
||||||
|
- "bash"
|
||||||
|
- "-c"
|
||||||
|
- "exec 3<>/dev/tcp/localhost/{{ container_port }} && echo -e 'GET /{{ container_healthcheck | default('') }} HTTP/1.1\\r\\nHost: localhost\\r\\nConnection: close\\r\\n\\r\\n' >&3 && cat <&3 | grep -q 'HTTP/1.1'"
|
||||||
|
{{ "\n" }}
|
11
roles/docker-container/templates/healthcheck/wget.yml.j2
Normal file
11
roles/docker-container/templates/healthcheck/wget.yml.j2
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
healthcheck:
|
||||||
|
test:
|
||||||
|
- "CMD"
|
||||||
|
- "wget"
|
||||||
|
- "--spider"
|
||||||
|
- "--proxy=off"
|
||||||
|
- "http://127.0.0.1{{ (":" ~ container_port) if container_port is defined else '' }}/{{ container_healthcheck | default('') }}"
|
||||||
|
interval: 1m
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
|
{{ "\n" }}
|
@@ -1,29 +1,23 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
|
||||||
|
|
||||||
application:
|
application:
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
image: "gitea/gitea:{{applications.gitea.version}}"
|
image: "gitea/gitea:{{applications.gitea.version}}"
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ports.localhost.http[application_id]}}:3000"
|
- "127.0.0.1:{{ports.localhost.http[application_id]}}:{{ container_port }}"
|
||||||
- "{{ports.public.ssh[application_id]}}:22"
|
- "{{ports.public.ssh[application_id]}}:22"
|
||||||
volumes:
|
volumes:
|
||||||
- data:/data
|
- data:/data
|
||||||
- /etc/timezone:/etc/timezone:ro
|
- /etc/timezone:/etc/timezone:ro
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
healthcheck:
|
{% include 'roles/docker-container/templates/healthcheck/curl.yml.j2' %}
|
||||||
test: ["CMD", "curl", "-f", "http://127.0.0.1:3000"]
|
|
||||||
interval: 1m
|
|
||||||
timeout: 10s
|
|
||||||
retries: 3
|
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
|
||||||
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
|
|
||||||
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
data:
|
data:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
||||||
coturn:
|
coturn:
|
||||||
image: coturn/coturn
|
image: coturn/coturn
|
||||||
restart: always
|
restart: always
|
||||||
|
@@ -1,2 +1,3 @@
|
|||||||
application_id: "coturn"
|
application_id: "coturn"
|
||||||
|
container_port: 3000
|
||||||
#database_type: "mariadb"
|
#database_type: "mariadb"
|
@@ -1,12 +1,8 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/services/redis.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
|
|
||||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
|
||||||
redis:
|
redis:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
||||||
discourse_default:
|
discourse_default:
|
||||||
external: true
|
external: true
|
@@ -21,3 +21,9 @@ csp:
|
|||||||
domains:
|
domains:
|
||||||
canonical:
|
canonical:
|
||||||
- "forum.{{ primary_domain }}"
|
- "forum.{{ primary_domain }}"
|
||||||
|
docker:
|
||||||
|
services:
|
||||||
|
database:
|
||||||
|
enabled: true
|
||||||
|
redis:
|
||||||
|
enabled: true
|
@@ -1,4 +1,4 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
elasticsearch:
|
elasticsearch:
|
||||||
build:
|
build:
|
||||||
context: elasticsearch/
|
context: elasticsearch/
|
||||||
@@ -61,5 +61,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- elasticsearch
|
- elasticsearch
|
||||||
|
|
||||||
volumes:
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
elasticsearch:
|
elasticsearch:
|
||||||
|
|
||||||
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
||||||
|
@@ -1,16 +1,12 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
|
||||||
|
|
||||||
web:
|
web:
|
||||||
image: "{{ applications[application_id].images.espocrm }}"
|
image: "{{ applications[application_id].images.espocrm }}"
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
healthcheck:
|
{% include 'roles/docker-container/templates/healthcheck/curl.yml.j2' %}
|
||||||
test: ["CMD", "curl", "-f", "http://localhost/"]
|
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:80"
|
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:80"
|
||||||
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
volumes:
|
volumes:
|
||||||
- data:/var/www/html
|
- data:/var/www/html
|
||||||
|
|
||||||
@@ -20,7 +16,7 @@ services:
|
|||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
entrypoint: docker-daemon.sh
|
entrypoint: docker-daemon.sh
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
volumes:
|
volumes:
|
||||||
- data:/var/www/html
|
- data:/var/www/html
|
||||||
|
|
||||||
@@ -35,14 +31,14 @@ services:
|
|||||||
- ESPOCRM_CONFIG_WEB_SOCKET_ZERO_M_Q_SUBSCRIBER_DSN=tcp://*:7777
|
- ESPOCRM_CONFIG_WEB_SOCKET_ZERO_M_Q_SUBSCRIBER_DSN=tcp://*:7777
|
||||||
- ESPOCRM_CONFIG_WEB_SOCKET_ZERO_M_Q_SUBMISSION_DSN=tcp://websocket:7777
|
- ESPOCRM_CONFIG_WEB_SOCKET_ZERO_M_Q_SUBMISSION_DSN=tcp://websocket:7777
|
||||||
entrypoint: docker-websocket.sh
|
entrypoint: docker-websocket.sh
|
||||||
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
volumes:
|
volumes:
|
||||||
- data:/var/www/html
|
- data:/var/www/html
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ ports.localhost.websocket[application_id] }}:8080"
|
- "127.0.0.1:{{ ports.localhost.websocket[application_id] }}:8080"
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
data:
|
data:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
@@ -26,4 +26,8 @@ domains:
|
|||||||
aliases:
|
aliases:
|
||||||
- "crm.{{ primary_domain }}"
|
- "crm.{{ primary_domain }}"
|
||||||
email:
|
email:
|
||||||
from_name: "Customer Relationship Management ({{ primary_domain }})"
|
from_name: "Customer Relationship Management ({{ primary_domain }})"
|
||||||
|
docker:
|
||||||
|
services:
|
||||||
|
database:
|
||||||
|
enabled: true
|
@@ -1,10 +1,7 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
|
||||||
|
|
||||||
application:
|
application:
|
||||||
image: "{{ applications[application_id].images.friendica }}"
|
image: "{{ applications[application_id].images.friendica }}"
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
volumes:
|
volumes:
|
||||||
- html:{{ friendica_application_base }}
|
- html:{{ friendica_application_base }}
|
||||||
- data:/var/www/data # I assume that this one is unnessecarry
|
- data:/var/www/data # I assume that this one is unnessecarry
|
||||||
@@ -12,13 +9,12 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
|
- "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
|
||||||
|
|
||||||
{% include 'roles/docker-compose/templates/services/msmtp_curl_test.yml.j2' %}
|
{% include 'roles/docker-container/templates/healthcheck/msmtp_curl.yml.j2' %}
|
||||||
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
|
||||||
data:
|
data:
|
||||||
html:
|
html:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
@@ -25,4 +25,8 @@ oauth2_proxy:
|
|||||||
port: "80"
|
port: "80"
|
||||||
addons:
|
addons:
|
||||||
keycloakpassword:
|
keycloakpassword:
|
||||||
ldapauth:
|
ldapauth:
|
||||||
|
docker:
|
||||||
|
services:
|
||||||
|
database:
|
||||||
|
enabled: true
|
@@ -1,8 +1,4 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'templates/docker/services/redis.yml.j2' %}
|
|
||||||
|
|
||||||
celeryworker:
|
celeryworker:
|
||||||
# Celery workers handle background tasks (such file imports or federation
|
# Celery workers handle background tasks (such file imports or federation
|
||||||
# messaging). The more processes a worker gets, the more tasks
|
# messaging). The more processes a worker gets, the more tasks
|
||||||
@@ -12,7 +8,7 @@ services:
|
|||||||
# of CPUs. You can adjust this, by explicitly setting the --concurrency
|
# of CPUs. You can adjust this, by explicitly setting the --concurrency
|
||||||
# flag:
|
# flag:
|
||||||
# celery -A funkwhale_api.taskapp worker -l INFO --concurrency=4
|
# celery -A funkwhale_api.taskapp worker -l INFO --concurrency=4
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
image: "{{ applications | get_docker_image(application_id,'api') }}"
|
image: "{{ applications | get_docker_image(application_id,'api') }}"
|
||||||
command: celery -A funkwhale_api.taskapp worker -l INFO --concurrency={{celeryd_concurrency}}
|
command: celery -A funkwhale_api.taskapp worker -l INFO --concurrency={{celeryd_concurrency}}
|
||||||
environment:
|
environment:
|
||||||
@@ -20,18 +16,18 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- "data:{{funkwhale_media_root}}"
|
- "data:{{funkwhale_media_root}}"
|
||||||
- "music:{{funkwhale_music_directory_path}}:ro"
|
- "music:{{funkwhale_music_directory_path}}:ro"
|
||||||
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
|
||||||
celerybeat:
|
celerybeat:
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
image: "{{ applications | get_docker_image(application_id,'api') }}"
|
image: "{{ applications | get_docker_image(application_id,'api') }}"
|
||||||
command: celery -A funkwhale_api.taskapp beat --pidfile= -l INFO
|
command: celery -A funkwhale_api.taskapp beat --pidfile= -l INFO
|
||||||
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
|
||||||
api:
|
api:
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
image: "{{ applications | get_docker_image(application_id,'api') }}"
|
image: "{{ applications | get_docker_image(application_id,'api') }}"
|
||||||
volumes:
|
volumes:
|
||||||
- "music:{{funkwhale_music_directory_path}}:ro"
|
- "music:{{funkwhale_music_directory_path}}:ro"
|
||||||
@@ -39,11 +35,11 @@ services:
|
|||||||
- "funkwhale_static_root:{{funkwhale_static_root}}"
|
- "funkwhale_static_root:{{funkwhale_static_root}}"
|
||||||
ports:
|
ports:
|
||||||
- "{{ funkwhale_docker_api_port }}"
|
- "{{ funkwhale_docker_api_port }}"
|
||||||
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
|
||||||
front:
|
front:
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
image: "{{ applications | get_docker_image(application_id,'front') }}"
|
image: "{{ applications | get_docker_image(application_id,'front') }}"
|
||||||
depends_on:
|
depends_on:
|
||||||
- api
|
- api
|
||||||
@@ -56,7 +52,7 @@ services:
|
|||||||
- "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
|
- "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
|
||||||
|
|
||||||
typesense:
|
typesense:
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
image: "{{ applications[application_id].docker.images.typesense }}"
|
image: "{{ applications[application_id].docker.images.typesense }}"
|
||||||
volumes:
|
volumes:
|
||||||
- ./typesense/data:/data
|
- ./typesense/data:/data
|
||||||
@@ -64,10 +60,10 @@ services:
|
|||||||
profiles:
|
profiles:
|
||||||
- typesense
|
- typesense
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
data:
|
data:
|
||||||
funkwhale_static_root:
|
funkwhale_static_root:
|
||||||
redis:
|
redis:
|
||||||
music:
|
music:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
@@ -7,6 +7,11 @@ docker:
|
|||||||
api: "funkwhale/api"
|
api: "funkwhale/api"
|
||||||
front: "funkwhale/front"
|
front: "funkwhale/front"
|
||||||
typesense: "typesense/typesense"
|
typesense: "typesense/typesense"
|
||||||
|
services:
|
||||||
|
redis:
|
||||||
|
enabled: true
|
||||||
|
database:
|
||||||
|
enabled: true
|
||||||
features:
|
features:
|
||||||
matomo: true
|
matomo: true
|
||||||
css: false
|
css: false
|
||||||
|
@@ -1,20 +1,4 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'roles/docker-oauth2-proxy/templates/container.yml.j2' %}
|
|
||||||
|
|
||||||
application:
|
|
||||||
container_name: {{ application_id }}
|
|
||||||
image: ghcr.io/ldapaccountmanager/lam:{{applications[application_id].version}}
|
|
||||||
ports:
|
|
||||||
- 127.0.0.1:{{ports.localhost.http[application_id]}}:80
|
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
|
||||||
|
|
||||||
{# include 'templates/docker/compose/volumes.yml.j2' #}
|
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
|
||||||
|
|
||||||
services:
|
|
||||||
fusiondirectory:
|
fusiondirectory:
|
||||||
image: tiredofit/fusiondirectory:latest
|
image: tiredofit/fusiondirectory:latest
|
||||||
container_name: fusiondirectory
|
container_name: fusiondirectory
|
||||||
@@ -39,5 +23,7 @@ services:
|
|||||||
- fusiondirectory_data:/assets/fusiondirectory
|
- fusiondirectory_data:/assets/fusiondirectory
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
volumes:
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
fusiondirectory_data:
|
fusiondirectory_data:
|
||||||
|
|
||||||
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
@@ -1,28 +1,20 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'roles/docker-oauth2-proxy/templates/container.yml.j2' %}
|
|
||||||
|
|
||||||
application:
|
application:
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
image: "{{ applications[application_id].images.gitea }}"
|
image: "{{ applications[application_id].images.gitea }}"
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ports.localhost.http[application_id]}}:3000"
|
- "127.0.0.1:{{ports.localhost.http[application_id]}}:{{ container_port }}"
|
||||||
- "{{ports.public.ssh[application_id]}}:22"
|
- "{{ports.public.ssh[application_id]}}:22"
|
||||||
volumes:
|
volumes:
|
||||||
- data:/data
|
- data:/data
|
||||||
- /etc/timezone:/etc/timezone:ro
|
- /etc/timezone:/etc/timezone:ro
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
healthcheck:
|
{% include 'roles/docker-container/templates/healthcheck/curl.yml.j2' %}
|
||||||
test: ["CMD", "curl", "-f", "http://127.0.0.1:3000"]
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
interval: 1m
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
timeout: 10s
|
|
||||||
retries: 3
|
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
|
||||||
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
data:
|
data:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
@@ -36,4 +36,8 @@ csp:
|
|||||||
- "data:"
|
- "data:"
|
||||||
domains:
|
domains:
|
||||||
aliases:
|
aliases:
|
||||||
- "git.{{ primary_domain }}"
|
- "git.{{ primary_domain }}"
|
||||||
|
docker:
|
||||||
|
services:
|
||||||
|
database:
|
||||||
|
enabled: true
|
@@ -1,4 +1,5 @@
|
|||||||
application_id: "gitea"
|
application_id: "gitea"
|
||||||
|
container_port: 3000
|
||||||
database_type: "mariadb"
|
database_type: "mariadb"
|
||||||
gitea_ldap_auth_args:
|
gitea_ldap_auth_args:
|
||||||
- '--name "LDAP ({{ primary_domain }})"'
|
- '--name "LDAP ({{ primary_domain }})"'
|
||||||
|
@@ -1,13 +1,9 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/services/redis.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
|
||||||
|
|
||||||
web:
|
web:
|
||||||
image: "{{ applications[application_id].images.gitlab }}"
|
image: "{{ applications[application_id].images.gitlab }}"
|
||||||
hostname: '{{domains | get_domain(application_id)}}'
|
hostname: '{{domains | get_domain(application_id)}}'
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
|
- "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
|
||||||
- "{{ports.public.ssh[application_id]}}:22"
|
- "{{ports.public.ssh[application_id]}}:22"
|
||||||
@@ -16,13 +12,13 @@ services:
|
|||||||
- 'logs:/var/log/gitlab'
|
- 'logs:/var/log/gitlab'
|
||||||
- 'data:/var/opt/gitlab'
|
- 'data:/var/opt/gitlab'
|
||||||
shm_size: '256m'
|
shm_size: '256m'
|
||||||
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
|
||||||
redis:
|
redis:
|
||||||
config:
|
config:
|
||||||
logs:
|
logs:
|
||||||
data:
|
data:
|
||||||
|
|
||||||
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
||||||
|
@@ -4,4 +4,10 @@ features:
|
|||||||
matomo: true
|
matomo: true
|
||||||
css: true
|
css: true
|
||||||
portfolio_iframe: true
|
portfolio_iframe: true
|
||||||
central_database: true
|
central_database: true
|
||||||
|
docker:
|
||||||
|
services:
|
||||||
|
redis:
|
||||||
|
enabled: true
|
||||||
|
database:
|
||||||
|
enabled: true
|
@@ -1,18 +1,15 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
|
||||||
|
|
||||||
application:
|
application:
|
||||||
image: "{{ applications[application_id].images.joomla }}"
|
image: "{{ applications[application_id].images.joomla }}"
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
volumes:
|
volumes:
|
||||||
- data:/var/www/html
|
- data:/var/www/html
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
|
- "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
data:
|
data:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
||||||
|
@@ -4,6 +4,11 @@ features:
|
|||||||
matomo: true
|
matomo: true
|
||||||
css: true
|
css: true
|
||||||
portfolio_iframe: true
|
portfolio_iframe: true
|
||||||
|
central_database: true
|
||||||
domains:
|
domains:
|
||||||
canonical:
|
canonical:
|
||||||
- "cms.{{ primary_domain }}"
|
- "cms.{{ primary_domain }}"
|
||||||
|
docker:
|
||||||
|
services:
|
||||||
|
database:
|
||||||
|
enabled: true
|
@@ -1,22 +1,18 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
|
||||||
|
|
||||||
application:
|
application:
|
||||||
image: "{{ applications[application_id].images.keycloak }}"
|
image: "{{ applications[application_id].images.keycloak }}"
|
||||||
container_name: {{container_name}}
|
container_name: {{container_name}}
|
||||||
command: start {% if applications[application_id].import_realm | bool %}--import-realm{% endif %}
|
command: start {% if applications[application_id].import_realm | bool %}--import-realm{% endif %}
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
ports:
|
ports:
|
||||||
- "{{ keycloak_server_host }}:8080"
|
- "{{ keycloak_server_host }}:8080"
|
||||||
volumes:
|
volumes:
|
||||||
- "{{import_directory_host}}:{{import_directory_docker}}"
|
- "{{import_directory_host}}:{{import_directory_docker}}"
|
||||||
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
healthcheck:
|
{% set container_port = 9000 %}
|
||||||
test: ["CMD", "sh", "-c", "exec 3<>/dev/tcp/localhost/9000 && echo -e 'GET /health/live HTTP/1.1\\r\\nHost: {{domains | get_domain('keycloak')}}\\r\\nConnection: close\\r\\n\\r\\n' >&3 && cat <&3"]
|
{% set container_healthcheck = 'health/live' %}
|
||||||
interval: 30s
|
{% include 'roles/docker-container/templates/healthcheck/tcp.yml.j2' %}
|
||||||
timeout: 10s
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
@@ -25,3 +25,7 @@ scopes:
|
|||||||
nextcloud: nextcloud
|
nextcloud: nextcloud
|
||||||
|
|
||||||
rbac_groups: "/rbac"
|
rbac_groups: "/rbac"
|
||||||
|
docker:
|
||||||
|
services:
|
||||||
|
database:
|
||||||
|
enabled: true
|
@@ -1,15 +1,11 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'roles/docker-oauth2-proxy/templates/container.yml.j2' %}
|
|
||||||
|
|
||||||
application:
|
application:
|
||||||
container_name: {{ application_id }}
|
container_name: {{ application_id }}
|
||||||
image: "{{ applications[application_id].images.lam }}"
|
image: "{{ applications[application_id].images.lam }}"
|
||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:{{ports.localhost.http[application_id]}}:80
|
- 127.0.0.1:{{ports.localhost.http[application_id]}}:80
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
|
||||||
{# include 'templates/docker/compose/volumes.yml.j2' #}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
|
@@ -1,11 +1,9 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'roles/docker-oauth2-proxy/templates/container.yml.j2' %}
|
|
||||||
|
|
||||||
application:
|
application:
|
||||||
image: "{{ applications[application_id].images.openldap }}"
|
image: "{{ applications[application_id].images.openldap }}"
|
||||||
container_name: {{ applications[application_id].hostname }}
|
container_name: {{ applications[application_id].hostname }}
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
{% if applications[application_id].network.public | bool or applications[application_id].network.local | bool %}
|
{% if applications[application_id].network.public | bool or applications[application_id].network.local | bool %}
|
||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:{{ports.localhost.ldap.ldap}}:{{ldap_docker_port}} # Expose just on localhost so that nginx stream proxy can use it
|
- 127.0.0.1:{{ports.localhost.ldap.ldap}}:{{ldap_docker_port}} # Expose just on localhost so that nginx stream proxy can use it
|
||||||
@@ -22,9 +20,9 @@ services:
|
|||||||
-b cn=config "(&(objectClass=olcOverlayConfig)(olcOverlay=memberof))" \
|
-b cn=config "(&(objectClass=olcOverlayConfig)(olcOverlay=memberof))" \
|
||||||
| grep "olcOverlay:" | grep -q "memberof"
|
| grep "olcOverlay:" | grep -q "memberof"
|
||||||
'
|
'
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
data:
|
data:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
@@ -3,7 +3,7 @@
|
|||||||
# of localhost will only listen to connections from the current machine. To
|
# of localhost will only listen to connections from the current machine. To
|
||||||
# listen on all interfaces use '0.0.0.0'. To listen on the default web address
|
# listen on all interfaces use '0.0.0.0'. To listen on the default web address
|
||||||
# port, use port 80 (this will require running with elevated permissions).
|
# port, use port 80 (this will require running with elevated permissions).
|
||||||
address = "0.0.0.0:9000"
|
address = "0.0.0.0:{{ container_port }}"
|
||||||
|
|
||||||
# Database.
|
# Database.
|
||||||
[db]
|
[db]
|
||||||
|
@@ -1,19 +1,16 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
|
||||||
|
|
||||||
application:
|
application:
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% set container_healthcheck = 'health' %}
|
||||||
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
image: "{{ applications[application_id].images.listmonk }}"
|
image: "{{ applications[application_id].images.listmonk }}"
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ports.localhost.http[application_id]}}:9000"
|
- "127.0.0.1:{{ports.localhost.http[application_id]}}:{{ container_port }}"
|
||||||
volumes:
|
volumes:
|
||||||
- {{docker_compose.directories.config}}config.toml:/listmonk/config.toml
|
- {{docker_compose.directories.config}}config.toml:/listmonk/config.toml
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
healthcheck:
|
{% include 'roles/docker-container/templates/healthcheck/wget.yml.j2' %}
|
||||||
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:9000/health || exit 1']
|
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes-just-database.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes-just-database.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
@@ -10,4 +10,8 @@ features:
|
|||||||
oidc: true
|
oidc: true
|
||||||
domains:
|
domains:
|
||||||
canonical:
|
canonical:
|
||||||
- "newsletter.{{ primary_domain }}"
|
- "newsletter.{{ primary_domain }}"
|
||||||
|
docker:
|
||||||
|
services:
|
||||||
|
database:
|
||||||
|
enabled: true
|
@@ -1,5 +1,6 @@
|
|||||||
application_id: "listmonk"
|
application_id: "listmonk"
|
||||||
database_type: "postgres"
|
database_type: "postgres"
|
||||||
|
container_port: "9000"
|
||||||
|
|
||||||
listmonk_settings:
|
listmonk_settings:
|
||||||
- key: "app.root_url"
|
- key: "app.root_url"
|
||||||
|
@@ -1,19 +1,15 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/services/redis.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
|
||||||
|
|
||||||
# Core services
|
# Core services
|
||||||
resolver:
|
resolver:
|
||||||
image: {{docker_source}}/unbound:{{applications.mailu.version}}
|
image: {{docker_source}}/unbound:{{applications.mailu.version}}
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
ipv4_address: {{networks.local.mailu.dns}}
|
ipv4_address: {{networks.local.mailu.dns}}
|
||||||
|
|
||||||
front:
|
front:
|
||||||
image: {{docker_source}}/nginx:{{applications.mailu.version}}
|
image: {{docker_source}}/nginx:{{applications.mailu.version}}
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
|
- "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
|
||||||
- "{{networks.internet.ip4}}:25:25"
|
- "{{networks.internet.ip4}}:25:25"
|
||||||
@@ -27,10 +23,10 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- "{{docker_compose.directories.volumes}}overrides/nginx:/overrides:ro"
|
- "{{docker_compose.directories.volumes}}overrides/nginx:/overrides:ro"
|
||||||
- "{{cert_mount_directory}}:/certs:ro"
|
- "{{cert_mount_directory}}:/certs:ro"
|
||||||
{% include 'templates/docker/container/depends-on-also-database.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
resolver:
|
resolver:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
webmail:
|
webmail:
|
||||||
radicale:
|
radicale:
|
||||||
dns:
|
dns:
|
||||||
@@ -38,22 +34,22 @@ services:
|
|||||||
|
|
||||||
admin:
|
admin:
|
||||||
image: {{docker_source}}/admin:{{applications.mailu.version}}
|
image: {{docker_source}}/admin:{{applications.mailu.version}}
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
volumes:
|
volumes:
|
||||||
- "admin_data:/data"
|
- "admin_data:/data"
|
||||||
- "dkim:/dkim"
|
- "dkim:/dkim"
|
||||||
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
resolver:
|
resolver:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
front:
|
front:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
dns:
|
dns:
|
||||||
- {{networks.local.mailu.dns}}
|
- {{networks.local.mailu.dns}}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
|
||||||
imap:
|
imap:
|
||||||
image: {{docker_source}}/dovecot:{{applications.mailu.version}}
|
image: {{docker_source}}/dovecot:{{applications.mailu.version}}
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
volumes:
|
volumes:
|
||||||
- "dovecot_mail:/mail"
|
- "dovecot_mail:/mail"
|
||||||
- "{{docker_compose.directories.volumes}}overrides:/overrides:ro"
|
- "{{docker_compose.directories.volumes}}overrides:/overrides:ro"
|
||||||
@@ -62,11 +58,11 @@ services:
|
|||||||
- resolver
|
- resolver
|
||||||
dns:
|
dns:
|
||||||
- {{networks.local.mailu.dns}}
|
- {{networks.local.mailu.dns}}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
|
||||||
smtp:
|
smtp:
|
||||||
image: {{docker_source}}/postfix:{{applications.mailu.version}}
|
image: {{docker_source}}/postfix:{{applications.mailu.version}}
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
volumes:
|
volumes:
|
||||||
- "{{docker_compose.directories.volumes}}overrides:/overrides:ro"
|
- "{{docker_compose.directories.volumes}}overrides:/overrides:ro"
|
||||||
- "smtp_queue:/queue"
|
- "smtp_queue:/queue"
|
||||||
@@ -75,7 +71,7 @@ services:
|
|||||||
- resolver
|
- resolver
|
||||||
dns:
|
dns:
|
||||||
- {{networks.local.mailu.dns}}
|
- {{networks.local.mailu.dns}}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
|
||||||
oletools:
|
oletools:
|
||||||
image: {{docker_source}}/oletools:{{applications.mailu.version}}
|
image: {{docker_source}}/oletools:{{applications.mailu.version}}
|
||||||
@@ -85,12 +81,12 @@ services:
|
|||||||
- resolver
|
- resolver
|
||||||
dns:
|
dns:
|
||||||
- {{networks.local.mailu.dns}}
|
- {{networks.local.mailu.dns}}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
noinet:
|
noinet:
|
||||||
|
|
||||||
antispam:
|
antispam:
|
||||||
image: {{docker_source}}/rspamd:{{applications.mailu.version}}
|
image: {{docker_source}}/rspamd:{{applications.mailu.version}}
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
volumes:
|
volumes:
|
||||||
- "filter:/var/lib/rspamd"
|
- "filter:/var/lib/rspamd"
|
||||||
- "dkim:/dkim"
|
- "dkim:/dkim"
|
||||||
@@ -102,39 +98,39 @@ services:
|
|||||||
- resolver
|
- resolver
|
||||||
dns:
|
dns:
|
||||||
- {{networks.local.mailu.dns}}
|
- {{networks.local.mailu.dns}}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
noinet:
|
noinet:
|
||||||
|
|
||||||
|
|
||||||
# Optional services
|
# Optional services
|
||||||
antivirus:
|
antivirus:
|
||||||
image: clamav/clamav-debian:latest
|
image: clamav/clamav-debian:latest
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
volumes:
|
volumes:
|
||||||
- "filter:/data"
|
- "filter:/data"
|
||||||
depends_on:
|
depends_on:
|
||||||
- resolver
|
- resolver
|
||||||
dns:
|
dns:
|
||||||
- {{networks.local.mailu.dns}}
|
- {{networks.local.mailu.dns}}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
|
||||||
webdav:
|
webdav:
|
||||||
image: {{docker_source}}/radicale:{{applications.mailu.version}}
|
image: {{docker_source}}/radicale:{{applications.mailu.version}}
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
volumes:
|
volumes:
|
||||||
- "webdav_data:/data"
|
- "webdav_data:/data"
|
||||||
depends_on:
|
depends_on:
|
||||||
- resolver
|
- resolver
|
||||||
dns:
|
dns:
|
||||||
- {{networks.local.mailu.dns}}
|
- {{networks.local.mailu.dns}}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
radicale:
|
radicale:
|
||||||
|
|
||||||
fetchmail:
|
fetchmail:
|
||||||
image: {{docker_source}}/fetchmail:{{applications.mailu.version}}
|
image: {{docker_source}}/fetchmail:{{applications.mailu.version}}
|
||||||
volumes:
|
volumes:
|
||||||
- "admin_data:/data"
|
- "admin_data:/data"
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
depends_on:
|
depends_on:
|
||||||
- admin
|
- admin
|
||||||
- smtp
|
- smtp
|
||||||
@@ -142,11 +138,11 @@ services:
|
|||||||
- resolver
|
- resolver
|
||||||
dns:
|
dns:
|
||||||
- {{networks.local.mailu.dns}}
|
- {{networks.local.mailu.dns}}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
|
||||||
webmail:
|
webmail:
|
||||||
image: {{docker_source}}/webmail:{{applications.mailu.version}}
|
image: {{docker_source}}/webmail:{{applications.mailu.version}}
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
volumes:
|
volumes:
|
||||||
- "webmail_data:/data"
|
- "webmail_data:/data"
|
||||||
- "{{docker_compose.directories.volumes}}overrides:/overrides:ro"
|
- "{{docker_compose.directories.volumes}}overrides:/overrides:ro"
|
||||||
@@ -156,10 +152,10 @@ services:
|
|||||||
- resolver
|
- resolver
|
||||||
dns:
|
dns:
|
||||||
- {{networks.local.mailu.dns}}
|
- {{networks.local.mailu.dns}}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
webmail:
|
webmail:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
smtp_queue:
|
smtp_queue:
|
||||||
admin_data:
|
admin_data:
|
||||||
webdav_data:
|
webdav_data:
|
||||||
@@ -169,7 +165,7 @@ services:
|
|||||||
dovecot_mail:
|
dovecot_mail:
|
||||||
redis:
|
redis:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
||||||
radicale:
|
radicale:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
webmail:
|
webmail:
|
||||||
|
@@ -26,4 +26,9 @@ rbac:
|
|||||||
roles:
|
roles:
|
||||||
mail-bot:
|
mail-bot:
|
||||||
description: "Has an token to send and recieve emails"
|
description: "Has an token to send and recieve emails"
|
||||||
|
docker:
|
||||||
|
services:
|
||||||
|
redis:
|
||||||
|
enabled: true
|
||||||
|
database:
|
||||||
|
enabled: true
|
@@ -1,46 +1,44 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/services/redis.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
|
||||||
|
|
||||||
web:
|
web:
|
||||||
|
{% set container_port = 3000 %}
|
||||||
|
{% set container_healthcheck = 'health' %}
|
||||||
image: "{{ applications[application_id].images[application_id] }}"
|
image: "{{ applications[application_id].images[application_id] }}"
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
|
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p {{ container_port }}"
|
||||||
healthcheck:
|
{% include 'roles/docker-container/templates/healthcheck/wget.yml.j2' %}
|
||||||
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1']
|
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ports.localhost.http[application_id]}}:3000"
|
- "127.0.0.1:{{ports.localhost.http[application_id]}}:{{ container_port }}"
|
||||||
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
volumes:
|
volumes:
|
||||||
- data:/mastodon/public/system
|
- data:/mastodon/public/system
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
|
||||||
streaming:
|
streaming:
|
||||||
|
{% set container_port = 4000 %}
|
||||||
|
{% set container_healthcheck = 'api/v1/streaming/health' %}
|
||||||
image: "{{ applications[application_id].images.streaming }}"
|
image: "{{ applications[application_id].images.streaming }}"
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
command: node ./streaming
|
command: node ./streaming
|
||||||
healthcheck:
|
{% include 'roles/docker-container/templates/healthcheck/wget.yml.j2' %}
|
||||||
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1']
|
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ports.localhost.websocket[application_id]}}:4000"
|
- "127.0.0.1:{{ports.localhost.websocket[application_id]}}:{{ container_port }}"
|
||||||
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
|
||||||
sidekiq:
|
sidekiq:
|
||||||
image: "{{ applications[application_id].images.mastodon }}"
|
image: "{{ applications[application_id].images.mastodon }}"
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
command: bundle exec sidekiq
|
command: bundle exec sidekiq
|
||||||
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
volumes:
|
volumes:
|
||||||
- data:/mastodon/public/system
|
- data:/mastodon/public/system
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"]
|
test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"]
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
redis:
|
redis:
|
||||||
data:
|
data:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
@@ -16,4 +16,10 @@ domains:
|
|||||||
csp:
|
csp:
|
||||||
whitelist:
|
whitelist:
|
||||||
frame-src:
|
frame-src:
|
||||||
- "*"
|
- "*"
|
||||||
|
docker:
|
||||||
|
services:
|
||||||
|
redis:
|
||||||
|
enabled: true
|
||||||
|
database:
|
||||||
|
enabled: true
|
@@ -1,4 +1,4 @@
|
|||||||
# Matomo Analytics
|
# Matomo
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
|
@@ -1,23 +1,16 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
|
||||||
|
|
||||||
application:
|
application:
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% set container_port = 80 %}
|
||||||
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
image: "{{ applications[application_id].images[application_id] }}"
|
image: "{{ applications[application_id].images[application_id] }}"
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
|
- "127.0.0.1:{{ports.localhost.http[application_id]}}:{{ container_port }}"
|
||||||
volumes:
|
volumes:
|
||||||
- data:/var/www/html
|
- data:/var/www/html
|
||||||
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
healthcheck:
|
{% include 'roles/docker-container/templates/healthcheck/tcp.yml.j2' %}
|
||||||
test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/localhost/80 && echo -e 'GET / HTTP/1.1\\r\\nHost: localhost\\r\\nConnection: close\\r\\n\\r\\n' >&3 && cat <&3 | grep -q 'HTTP/1.1'"]
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
interval: 30s
|
|
||||||
timeout: 10s
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
|
||||||
data:
|
data:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
||||||
|
@@ -24,4 +24,9 @@ csp:
|
|||||||
domains:
|
domains:
|
||||||
aliases:
|
aliases:
|
||||||
- "analytics.{{ primary_domain }}"
|
- "analytics.{{ primary_domain }}"
|
||||||
excluded_ips: "{{ networks.internet.values() | list }}"
|
excluded_ips: "{{ networks.internet.values() | list }}"
|
||||||
|
|
||||||
|
docker:
|
||||||
|
services:
|
||||||
|
database:
|
||||||
|
enabled: true
|
@@ -1,8 +1,6 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
|
||||||
|
|
||||||
synapse:
|
synapse:
|
||||||
|
{% set container_port = 8008 %}
|
||||||
image: "{{ applications[application_id].images.synapse }}"
|
image: "{{ applications[application_id].images.synapse }}"
|
||||||
container_name: matrix-synapse
|
container_name: matrix-synapse
|
||||||
restart: {{docker_restart_policy}}
|
restart: {{docker_restart_policy}}
|
||||||
@@ -19,36 +17,28 @@ services:
|
|||||||
- SYNAPSE_SERVER_NAME={{domains.matrix.synapse}}
|
- SYNAPSE_SERVER_NAME={{domains.matrix.synapse}}
|
||||||
- SYNAPSE_REPORT_STATS=no
|
- SYNAPSE_REPORT_STATS=no
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ports.localhost.http.synapse}}:8008"
|
- "127.0.0.1:{{ports.localhost.http.synapse}}:{{ container_port }}"
|
||||||
healthcheck:
|
{% include 'roles/docker-container/templates/healthcheck/curl.yml.j2' %}
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:8008/"]
|
|
||||||
interval: 1m
|
|
||||||
timeout: 10s
|
|
||||||
retries: 3
|
|
||||||
{% if bridges | length > 0 %}
|
{% if bridges | length > 0 %}
|
||||||
{% include 'templates/docker/container/depends-on-also-database.yml.j2' %}
|
|
||||||
{% for item in bridges %}
|
{% for item in bridges %}
|
||||||
mautrix-{{item.bridge_name}}:
|
mautrix-{{item.bridge_name}}:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
element:
|
element:
|
||||||
|
{% set container_port = 80 %}
|
||||||
image: "{{ applications[application_id].images.element }}"
|
image: "{{ applications[application_id].images.element }}"
|
||||||
container_name: matrix-element
|
container_name: matrix-element
|
||||||
restart: {{docker_restart_policy}}
|
restart: {{docker_restart_policy}}
|
||||||
volumes:
|
volumes:
|
||||||
- ./element-config.json:/app/config.json
|
- ./element-config.json:/app/config.json
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ports.localhost.http.element}}:80"
|
- "127.0.0.1:{{ports.localhost.http.element}}:{{ container_port }}"
|
||||||
healthcheck:
|
{% include 'roles/docker-container/templates/healthcheck/wget.yml.j2' %}
|
||||||
test: ["CMD", "wget", "--spider", "-q", "http://localhost:80/"]
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
interval: 1m
|
|
||||||
timeout: 10s
|
|
||||||
retries: 3
|
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
|
||||||
|
|
||||||
{% for item in bridges %}
|
{% for item in bridges %}
|
||||||
mautrix-{{item.bridge_name}}:
|
mautrix-{{item.bridge_name}}:
|
||||||
@@ -62,7 +52,7 @@ services:
|
|||||||
interval: 1m
|
interval: 1m
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if applications[application_id].plugins.chatgpt | bool %}
|
{% if applications[application_id].plugins.chatgpt | bool %}
|
||||||
matrix-chatgpt-bot:
|
matrix-chatgpt-bot:
|
||||||
@@ -106,10 +96,10 @@ services:
|
|||||||
MATRIX_RICH_TEXT: 'true'
|
MATRIX_RICH_TEXT: 'true'
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
synapse_data:
|
synapse_data:
|
||||||
{% if applications[application_id].plugins.chatgpt | bool %}
|
{% if applications[application_id].plugins.chatgpt | bool %}
|
||||||
chatgpt_data:
|
chatgpt_data:
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
@@ -1,3 +1,7 @@
|
|||||||
|
docker:
|
||||||
|
services:
|
||||||
|
database:
|
||||||
|
enabled: true
|
||||||
images:
|
images:
|
||||||
synapse: "matrixdotorg/synapse:latest"
|
synapse: "matrixdotorg/synapse:latest"
|
||||||
element: "vectorim/element-web:latest"
|
element: "vectorim/element-web:latest"
|
||||||
|
@@ -1,20 +1,18 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
application:
|
||||||
|
# Seems like image tag got lost. @todo Check and implement if necessary
|
||||||
|
log_driver: journald
|
||||||
|
restart: "{{docker_restart_policy}}"
|
||||||
|
depends_on:
|
||||||
|
- database
|
||||||
|
volumes:
|
||||||
|
- "mediawiki-data:/var/www/html/"
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
|
||||||
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
|
|
||||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
application:
|
|
||||||
# Seems like image tag got lost. @todo Check and implement if necessary
|
|
||||||
log_driver: journald
|
|
||||||
restart: "{{docker_restart_policy}}"
|
|
||||||
depends_on:
|
|
||||||
- database
|
|
||||||
volumes:
|
|
||||||
- "mediawiki-data:/var/www/html/"
|
|
||||||
ports:
|
|
||||||
- "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
|
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
|
||||||
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
|
||||||
data:
|
data:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
@@ -1,25 +1,18 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
|
||||||
|
|
||||||
application:
|
application:
|
||||||
image: "{{ applications[application_id].images[application_id] }}"
|
image: "{{ applications[application_id].images[application_id] }}"
|
||||||
volumes:
|
volumes:
|
||||||
- uploads:/var/lib/mobilizon/uploads
|
- uploads:/var/lib/mobilizon/uploads
|
||||||
- {{ mobilizon_host_conf_exs_file }}:/etc/mobilizon/config.exs:ro
|
- {{ mobilizon_host_conf_exs_file }}:/etc/mobilizon/config.exs:ro
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:{{ mobilizon_exposed_docker_port }}"
|
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:{{ container_port }}"
|
||||||
healthcheck:
|
{% include 'roles/docker-container/templates/healthcheck/curl.yml.j2' %}
|
||||||
test: ["CMD", "curl", "-f", "http://127.0.0.1:{{ mobilizon_exposed_docker_port }}"]
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
interval: 30s
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
timeout: 10s
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
retries: 3
|
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
|
||||||
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
|
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
uploads:
|
uploads:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@ MOBILIZON_INSTANCE_HOST={{ domains | get_domain(application_id) }}
|
|||||||
# MOBILIZON_INSTANCE_LISTEN_IP
|
# MOBILIZON_INSTANCE_LISTEN_IP
|
||||||
|
|
||||||
# The port to listen on (defaults to 4000). Point your reverse proxy on this port.
|
# The port to listen on (defaults to 4000). Point your reverse proxy on this port.
|
||||||
MOBILIZON_INSTANCE_PORT={{ mobilizon_exposed_docker_port }}
|
MOBILIZON_INSTANCE_PORT={{ container_port }}
|
||||||
|
|
||||||
# Whether registrations are opened or closed. Can be changed in the admin settings UI as well.
|
# Whether registrations are opened or closed. Can be changed in the admin settings UI as well.
|
||||||
# Make sure to moderate actively your instance if registrations are opened.
|
# Make sure to moderate actively your instance if registrations are opened.
|
||||||
|
@@ -15,4 +15,8 @@ domains:
|
|||||||
canonical:
|
canonical:
|
||||||
- "event.{{ primary_domain }}"
|
- "event.{{ primary_domain }}"
|
||||||
aliases:
|
aliases:
|
||||||
- "events.{{ primary_domain }}"
|
- "events.{{ primary_domain }}"
|
||||||
|
docker:
|
||||||
|
services:
|
||||||
|
database:
|
||||||
|
enabled: true
|
@@ -4,5 +4,5 @@ database_type: "postgres"
|
|||||||
database_gis_enabled: true
|
database_gis_enabled: true
|
||||||
|
|
||||||
mobilizon_oidc_callback_url: "{{ domains | get_url(application_id, web_protocol) }}/auth/openid_connect/callback"
|
mobilizon_oidc_callback_url: "{{ domains | get_url(application_id, web_protocol) }}/auth/openid_connect/callback"
|
||||||
mobilizon_exposed_docker_port: 4000
|
container_port: 4000
|
||||||
mobilizon_host_conf_exs_file: "{{docker_compose.directories.config}}config.exs"
|
mobilizon_host_conf_exs_file: "{{docker_compose.directories.config}}config.exs"
|
@@ -1,29 +1,25 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
|
||||||
moodle:
|
moodle:
|
||||||
|
{% set container_port = 8080 %}
|
||||||
container_name: {{ container_name }}
|
container_name: {{ container_name }}
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
image: moodle_custom
|
image: moodle_custom
|
||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:{{ports.localhost.http[application_id]}}:8080
|
- 127.0.0.1:{{ports.localhost.http[application_id]}}:{{ container_port }}
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
volumes:
|
volumes:
|
||||||
- 'code:{{ bitnami_code_link }}'
|
- 'code:{{ bitnami_code_link }}'
|
||||||
- 'data:{{ bitnami_data_dir }}'
|
- 'data:{{ bitnami_data_dir }}'
|
||||||
healthcheck:
|
{% include 'roles/docker-container/templates/healthcheck/tcp.yml.j2' %}
|
||||||
test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/localhost/8080 && echo -e 'GET / HTTP/1.1\\r\\nHost: localhost\\r\\nConnection: close\\r\\n\\r\\n' >&3 && cat <&3 | grep -q 'HTTP/1.1'"]
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
interval: 30s
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
timeout: 10s
|
|
||||||
retries: 3
|
|
||||||
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
|
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
code:
|
code:
|
||||||
data:
|
data:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
||||||
|
|
@@ -24,4 +24,8 @@ csp:
|
|||||||
- "https://cdn.jsdelivr.net"
|
- "https://cdn.jsdelivr.net"
|
||||||
domains:
|
domains:
|
||||||
canonical:
|
canonical:
|
||||||
- "academy.{{ primary_domain }}"
|
- "academy.{{ primary_domain }}"
|
||||||
|
docker:
|
||||||
|
services:
|
||||||
|
database:
|
||||||
|
enabled: true
|
@@ -1,7 +1,4 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
|
||||||
|
|
||||||
application:
|
application:
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
@@ -11,8 +8,8 @@ services:
|
|||||||
restart: {{docker_restart_policy}}
|
restart: {{docker_restart_policy}}
|
||||||
volumes:
|
volumes:
|
||||||
- data:/var/www/html
|
- data:/var/www/html
|
||||||
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
|
||||||
server:
|
server:
|
||||||
logging:
|
logging:
|
||||||
@@ -26,9 +23,9 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- "{{docker_compose_instance_confd_directory}}:{{target_mount_conf_d_directory}}:ro"
|
- "{{docker_compose_instance_confd_directory}}:{{target_mount_conf_d_directory}}:ro"
|
||||||
- "data:/var/www/html:ro"
|
- "data:/var/www/html:ro"
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
data:
|
data:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
@@ -3,5 +3,10 @@ version: "latest"
|
|||||||
features:
|
features:
|
||||||
matomo: true
|
matomo: true
|
||||||
css: true
|
css: true
|
||||||
portfolio_iframe: false
|
portfolio_iframe: true
|
||||||
central_database: true
|
central_database: true
|
||||||
|
|
||||||
|
docker:
|
||||||
|
services:
|
||||||
|
database:
|
||||||
|
enabled: true
|
@@ -1,8 +1,4 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/services/redis.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
|
||||||
|
|
||||||
application:
|
application:
|
||||||
image: "nextcloud:{{applications.nextcloud.version}}-fpm-alpine"
|
image: "nextcloud:{{applications.nextcloud.version}}-fpm-alpine"
|
||||||
@@ -15,9 +11,9 @@ services:
|
|||||||
interval: 1m
|
interval: 1m
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
ipv4_address: 192.168.102.69
|
ipv4_address: 192.168.102.69
|
||||||
|
|
||||||
# @Todo activate
|
# @Todo activate
|
||||||
@@ -49,16 +45,13 @@ services:
|
|||||||
driver: journald
|
driver: journald
|
||||||
restart: {{docker_restart_policy}}
|
restart: {{docker_restart_policy}}
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
|
- "127.0.0.1:{{ports.localhost.http[application_id]}}:{{ container_port }}"
|
||||||
volumes:
|
volumes:
|
||||||
- "{{docker_compose.directories.volumes}}nginx.conf:/etc/nginx/nginx.conf:ro"
|
- "{{docker_compose.directories.volumes}}nginx.conf:/etc/nginx/nginx.conf:ro"
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- application
|
- application
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:80/"]
|
{% include 'roles/docker-container/templates/healthcheck/curl.yml.j2' %}
|
||||||
interval: 1m
|
|
||||||
timeout: 10s
|
|
||||||
retries: 3
|
|
||||||
networks:
|
networks:
|
||||||
default:
|
default:
|
||||||
ipv4_address: 192.168.102.67
|
ipv4_address: 192.168.102.67
|
||||||
@@ -77,12 +70,12 @@ services:
|
|||||||
interval: 1m
|
interval: 1m
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
ipv4_address: 192.168.102.70
|
ipv4_address: 192.168.102.70
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
data:
|
data:
|
||||||
redis:
|
redis:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
||||||
|
@@ -11,7 +11,12 @@ csp:
|
|||||||
domains:
|
domains:
|
||||||
canonical:
|
canonical:
|
||||||
- "cloud.{{ primary_domain }}"
|
- "cloud.{{ primary_domain }}"
|
||||||
|
docker:
|
||||||
|
services:
|
||||||
|
redis:
|
||||||
|
enabled: true
|
||||||
|
database:
|
||||||
|
enabled: true
|
||||||
oidc:
|
oidc:
|
||||||
enabled: "{{ applications.nextcloud.features.oidc | default(true) }}" # Activate OIDC for Nextcloud
|
enabled: "{{ applications.nextcloud.features.oidc | default(true) }}" # Activate OIDC for Nextcloud
|
||||||
# floavor decides which OICD plugin should be used.
|
# floavor decides which OICD plugin should be used.
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
# General
|
# General
|
||||||
application_id: "nextcloud" # Application identifier
|
application_id: "nextcloud" # Application identifier
|
||||||
|
container_port: 80
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
database_password: "{{applications.nextcloud.credentials.database_password}}" # Database password
|
database_password: "{{applications.nextcloud.credentials.database_password}}" # Database password
|
||||||
|
@@ -7,18 +7,15 @@ x-op-app: &app
|
|||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
|
||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'roles/docker-oauth2-proxy/templates/container.yml.j2' %}
|
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
image: memcached
|
image: memcached
|
||||||
container_name: openproject-memcached
|
container_name: openproject-memcached
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
|
|
||||||
proxy:
|
proxy:
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
image: {{custom_openproject_image}}
|
image: {{custom_openproject_image}}
|
||||||
container_name: openproject-proxy
|
container_name: openproject-proxy
|
||||||
command: "./docker/prod/proxy"
|
command: "./docker/prod/proxy"
|
||||||
@@ -34,32 +31,29 @@ services:
|
|||||||
|
|
||||||
web:
|
web:
|
||||||
<<: *app
|
<<: *app
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
command: "./docker/prod/web"
|
command: "./docker/prod/web"
|
||||||
container_name: openproject-web
|
container_name: openproject-web
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
{% include 'templates/docker/container/depends-on-also-database.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
cache:
|
cache:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
seeder:
|
seeder:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
healthcheck:
|
{% set container_port = 8080 %}
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:8080/health_checks/default"]
|
{% set container_healthcheck = 'health_checks/default' %}
|
||||||
interval: 10s
|
{% include 'roles/docker-container/templates/healthcheck/curl.yml.j2' %}
|
||||||
timeout: 3s
|
|
||||||
retries: 3
|
|
||||||
start_period: 30s
|
|
||||||
volumes:
|
volumes:
|
||||||
- "data:/var/openproject/assets"
|
- "data:/var/openproject/assets"
|
||||||
- "{{dummy_volume}}:/var/openproject/pgdata" # This mount is unnecessary and just done to prevent anonymous volumes
|
- "{{dummy_volume}}:/var/openproject/pgdata" # This mount is unnecessary and just done to prevent anonymous volumes
|
||||||
|
|
||||||
worker:
|
worker:
|
||||||
<<: *app
|
<<: *app
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
command: "./docker/prod/worker"
|
command: "./docker/prod/worker"
|
||||||
container_name: openproject-worker
|
container_name: openproject-worker
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
{% include 'templates/docker/container/depends-on-also-database.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
cache:
|
cache:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
seeder:
|
seeder:
|
||||||
@@ -71,11 +65,11 @@ services:
|
|||||||
|
|
||||||
cron:
|
cron:
|
||||||
<<: *app
|
<<: *app
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
command: "./docker/prod/cron"
|
command: "./docker/prod/cron"
|
||||||
container_name: openproject-cron
|
container_name: openproject-cron
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
{% include 'templates/docker/container/depends-on-also-database.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
cache:
|
cache:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
seeder:
|
seeder:
|
||||||
@@ -93,12 +87,12 @@ services:
|
|||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
volumes:
|
volumes:
|
||||||
- "data:/var/openproject/assets"
|
- "data:/var/openproject/assets"
|
||||||
- "{{dummy_volume}}:/var/openproject/pgdata" # This mount is unnecessary and just done to prevent anonymous volumes
|
- "{{dummy_volume}}:/var/openproject/pgdata" # This mount is unnecessary and just done to prevent anonymous volumes
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
|
data:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
||||||
data:
|
|
@@ -26,4 +26,9 @@ csp:
|
|||||||
unsafe-inline: true
|
unsafe-inline: true
|
||||||
domains:
|
domains:
|
||||||
canonical:
|
canonical:
|
||||||
- "project.{{ primary_domain }}"
|
- "project.{{ primary_domain }}"
|
||||||
|
|
||||||
|
docker:
|
||||||
|
services:
|
||||||
|
database:
|
||||||
|
enabled: true
|
@@ -2,7 +2,7 @@ application_id: "openproject"
|
|||||||
docker_repository_address: "https://github.com/opf/openproject-deploy"
|
docker_repository_address: "https://github.com/opf/openproject-deploy"
|
||||||
database_type: "postgres"
|
database_type: "postgres"
|
||||||
docker_repository: true
|
docker_repository: true
|
||||||
|
|
||||||
openproject_plugins_folder: "{{docker_compose.directories.volumes}}plugins/"
|
openproject_plugins_folder: "{{docker_compose.directories.volumes}}plugins/"
|
||||||
|
|
||||||
custom_openproject_image: "custom_openproject"
|
custom_openproject_image: "custom_openproject"
|
||||||
|
@@ -1,33 +1,26 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/services/redis.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
|
||||||
|
|
||||||
application:
|
application:
|
||||||
|
{% set container_port = 9000 %}
|
||||||
image: chocobozzz/peertube:production-{{ applications[application_id].version }}
|
image: chocobozzz/peertube:production-{{ applications[application_id].version }}
|
||||||
container_name: {{ container_name }}
|
container_name: {{ container_name }}
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
ports:
|
ports:
|
||||||
- "1935:1935" # @todo Add to ports
|
- "1935:1935" # @todo Add to ports
|
||||||
- "127.0.0.1:{{ports.localhost.http[application_id]}}:9000"
|
- "127.0.0.1:{{ports.localhost.http[application_id]}}:{{ container_port }}"
|
||||||
volumes:
|
volumes:
|
||||||
- assets:/app/client/dist
|
- assets:/app/client/dist
|
||||||
- data:/data
|
- data:/data
|
||||||
- config:/config
|
- config:/config
|
||||||
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
healthcheck:
|
healthcheck:
|
||||||
# This just tests if the service is running on port 9000. It doesn't check if there is an 200 or e.g. an 404 response
|
# This just tests if the service is running on port 9000. It doesn't check if there is an 200 or e.g. an 404 response
|
||||||
test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/localhost/9000 && echo -e 'GET / HTTP/1.1\\r\\nHost: localhost\\r\\nConnection: close\\r\\n\\r\\n' >&3 && cat <&3 | grep -q 'HTTP/1.1'"]
|
{% include 'roles/docker-container/templates/healthcheck/tcp.yml.j2' %}
|
||||||
interval: 30s
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
timeout: 10s
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
|
||||||
assets:
|
assets:
|
||||||
data:
|
data:
|
||||||
redis:
|
redis:
|
||||||
config:
|
config:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
@@ -24,4 +24,10 @@ domains:
|
|||||||
canonical:
|
canonical:
|
||||||
- "video.{{ primary_domain }}"
|
- "video.{{ primary_domain }}"
|
||||||
aliases:
|
aliases:
|
||||||
- "videos.{{ primary_domain }}"
|
- "videos.{{ primary_domain }}"
|
||||||
|
docker:
|
||||||
|
services:
|
||||||
|
redis:
|
||||||
|
enabled: true
|
||||||
|
database:
|
||||||
|
enabled: true
|
@@ -1,20 +1,15 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'roles/docker-oauth2-proxy/templates/container.yml.j2' %}
|
|
||||||
|
|
||||||
application:
|
application:
|
||||||
|
{% set container_port = 80 %}
|
||||||
image: dpage/pgadmin4:{{applications[application_id].version}}
|
image: dpage/pgadmin4:{{applications[application_id].version}}
|
||||||
container_name: pgadmin
|
container_name: pgadmin
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
|
- "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
|
||||||
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
healthcheck:
|
{% include 'roles/docker-container/templates/healthcheck/wget.yml.j2' %}
|
||||||
test: ["CMD", "wget", "--spider", "-q", "http://localhost:80/"]
|
|
||||||
interval: 30s
|
|
||||||
timeout: 10s
|
|
||||||
retries: 3
|
|
||||||
volumes:
|
volumes:
|
||||||
- "data:/var/lib/pgadmin"
|
- "data:/var/lib/pgadmin"
|
||||||
{% if applications[application_id].server_mode | bool %}
|
{% if applications[application_id].server_mode | bool %}
|
||||||
@@ -22,7 +17,7 @@ services:
|
|||||||
- "{{ pgadmin_host_password_file }}:{{ pgadmin_docker_password_file }}"
|
- "{{ pgadmin_host_password_file }}:{{ pgadmin_docker_password_file }}"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
data:
|
data:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
@@ -18,4 +18,8 @@ csp:
|
|||||||
unsafe-inline: true
|
unsafe-inline: true
|
||||||
whitelist:
|
whitelist:
|
||||||
font-src:
|
font-src:
|
||||||
- "data:"
|
- "data:"
|
||||||
|
docker:
|
||||||
|
services:
|
||||||
|
database:
|
||||||
|
enabled: true
|
@@ -1,17 +1,15 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'roles/docker-oauth2-proxy/templates/container.yml.j2' %}
|
|
||||||
|
|
||||||
application:
|
application:
|
||||||
container_name: {{ application_id }}
|
container_name: {{ application_id }}
|
||||||
image: leenooks/phpldapadmin:{{applications[application_id].version}}
|
image: leenooks/phpldapadmin:{{applications[application_id].version}}
|
||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:{{ports.localhost.http[application_id]}}:8080
|
- 127.0.0.1:{{ports.localhost.http[application_id]}}:8080
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
data:
|
data:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
||||||
|
@@ -1,19 +1,14 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'roles/docker-oauth2-proxy/templates/container.yml.j2' %}
|
|
||||||
|
|
||||||
application:
|
application:
|
||||||
|
{% set container_port = 80 %}
|
||||||
image: phpmyadmin/phpmyadmin:{{applications.phpmyadmin.version}}
|
image: phpmyadmin/phpmyadmin:{{applications.phpmyadmin.version}}
|
||||||
container_name: phpmyadmin
|
container_name: phpmyadmin
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
|
- "127.0.0.1:{{ports.localhost.http[application_id]}}:{{ container_port }}"
|
||||||
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
healthcheck:
|
{% include 'roles/docker-container/templates/healthcheck/tcp.yml.j2' %}
|
||||||
test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/localhost/80 && echo -e 'GET / HTTP/1.1\\r\\nHost: localhost\\r\\nConnection: close\\r\\n\\r\\n' >&3 && cat <&3 | grep -q 'HTTP/1.1'"]
|
|
||||||
interval: 30s
|
|
||||||
timeout: 10s
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
@@ -20,3 +20,7 @@ domains:
|
|||||||
aliases:
|
aliases:
|
||||||
- "mysql.{{ primary_domain }}"
|
- "mysql.{{ primary_domain }}"
|
||||||
- "mariadb.{{ primary_domain }}"
|
- "mariadb.{{ primary_domain }}"
|
||||||
|
docker:
|
||||||
|
services:
|
||||||
|
database:
|
||||||
|
enabled: true
|
||||||
|
@@ -1,22 +1,18 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
|
|
||||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'templates/docker/services/redis.yml.j2' %}
|
|
||||||
|
|
||||||
application:
|
application:
|
||||||
image: "{{ applications[application_id].images.pixelfed }}"
|
image: "{{ applications[application_id].images.pixelfed }}"
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
volumes:
|
volumes:
|
||||||
- "data:/var/www/storage"
|
- "data:/var/www/storage"
|
||||||
- "./env:/var/www/.env"
|
- "./env:/var/www/.env"
|
||||||
ports:
|
ports:
|
||||||
- "{{ports.localhost.http[application_id]}}:80"
|
- "{{ports.localhost.http[application_id]}}:80"
|
||||||
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
worker:
|
worker:
|
||||||
image: "{{ applications[application_id].images.pixelfed }}"
|
image: "{{ applications[application_id].images.pixelfed }}"
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
volumes:
|
volumes:
|
||||||
- "data:/var/www/storage"
|
- "data:/var/www/storage"
|
||||||
- "./env:/var/www/.env"
|
- "./env:/var/www/.env"
|
||||||
@@ -26,13 +22,13 @@ services:
|
|||||||
interval: 60s
|
interval: 60s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 1
|
retries: 1
|
||||||
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
|
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
|
||||||
application:
|
application:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
redis:
|
redis:
|
||||||
data:
|
data:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
@@ -22,4 +22,10 @@ domains:
|
|||||||
canonical:
|
canonical:
|
||||||
- "picture.{{ primary_domain }}"
|
- "picture.{{ primary_domain }}"
|
||||||
aliases:
|
aliases:
|
||||||
- "pictures.{{ primary_domain }}"
|
- "pictures.{{ primary_domain }}"
|
||||||
|
docker:
|
||||||
|
services:
|
||||||
|
redis:
|
||||||
|
enabled: true
|
||||||
|
database:
|
||||||
|
enabled: true
|
@@ -1,19 +1,17 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
portfolio:
|
portfolio:
|
||||||
|
{% set container_port = 5000 %}
|
||||||
build:
|
build:
|
||||||
context: {{docker_repository_path}}
|
context: {{docker_repository_path}}
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
image: application-portfolio
|
image: application-portfolio
|
||||||
container_name: portfolio
|
container_name: portfolio
|
||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:{{ports.localhost.http[application_id]}}:5000
|
- 127.0.0.1:{{ports.localhost.http[application_id]}}:{{ container_port }}
|
||||||
volumes:
|
volumes:
|
||||||
- {{docker_repository_path}}app:/app
|
- {{docker_repository_path}}app:/app
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
healthcheck:
|
{% include 'roles/docker-container/templates/healthcheck/tcp.yml.j2' %}
|
||||||
test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/localhost/5000 && echo -e 'GET / HTTP/1.1\\r\\nHost: localhost\\r\\nConnection: close\\r\\n\\r\\n' >&3 && cat <&3 | grep -q 'HTTP/1.1'"]
|
|
||||||
interval: 30s
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
||||||
timeout: 10s
|
|
||||||
retries: 3
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
|
@@ -1,4 +1,4 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
cymais-presentation:
|
cymais-presentation:
|
||||||
build:
|
build:
|
||||||
context: {{ path_cymais_presentation_output.stdout }}
|
context: {{ path_cymais_presentation_output.stdout }}
|
||||||
@@ -8,8 +8,8 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- {{ path_cymais_presentation_output.stdout }}:/app
|
- {{ path_cymais_presentation_output.stdout }}:/app
|
||||||
- {{ path_cymais_output.stdout }}:/source
|
- {{ path_cymais_output.stdout }}:/source
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
||||||
|
|
||||||
|
43
roles/docker-redis/README.md
Normal file
43
roles/docker-redis/README.md
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
# Role: docker-redis
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
This Ansible role provides a Jinja2 snippet to inject a Redis service definition into your Docker Compose setup. It renders a `service.yml.j2` template that defines a `redis` container with sensible defaults.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
The role’s `service.yml.j2` template includes:
|
||||||
|
|
||||||
|
- An Alpine-based Redis image (`redis:alpine`)
|
||||||
|
- Container naming based on `application_id` (defaults to `redis`)
|
||||||
|
- Restart policy
|
||||||
|
|
||||||
|
- Journald logging driver
|
||||||
|
- A named volume (`redis:/data`) for persistence
|
||||||
|
- A basic healthcheck using `redis-cli ping`
|
||||||
|
- Attachment to the default network
|
||||||
|
|
||||||
|
Include this snippet in your top-level `docker-compose.yml.j2` where you want Redis to appear.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- **Configurable `application_id`**
|
||||||
|
Sets container name (`{{ application_id }}-redis`).
|
||||||
|
|
||||||
|
- **Restart policy**
|
||||||
|
Controlled by `docker_restart_policy`.
|
||||||
|
|
||||||
|
- **Journald logging**
|
||||||
|
Ensures logs are captured by systemd’s journal.
|
||||||
|
|
||||||
|
- **Persistent storage**
|
||||||
|
Declares and mounts `redis:/data`.
|
||||||
|
|
||||||
|
- **Built-in healthcheck**
|
||||||
|
Uses `redis-cli ping` with configurable intervals and retries.
|
||||||
|
|
||||||
|
## Further Resources
|
||||||
|
|
||||||
|
- [Official Redis Docker image on Docker Hub](https://hub.docker.com/_/redis)
|
||||||
|
- [Ansible Jinja2 documentation](https://docs.ansible.com/ansible/latest/user_guide/playbooks_templating.html)
|
||||||
|
- [Docker Compose reference](https://docs.docker.com/compose/compose-file/)
|
1
roles/docker-redis/vars/main.yml
Normal file
1
roles/docker-redis/vars/main.yml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
application_id: redis
|
@@ -1,8 +1,10 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
application:
|
application:
|
||||||
container_name: roulette_application
|
container_name: roulette_application
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:{{ports.localhost.http[application_id]}}:8080
|
- 127.0.0.1:{{ports.localhost.http[application_id]}}:8080
|
||||||
restart: {{docker_restart_policy}}
|
restart: {{docker_restart_policy}}
|
||||||
|
|
||||||
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
34
roles/docker-simpleicons/README.md
Normal file
34
roles/docker-simpleicons/README.md
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# Simple Icons
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
This Ansible role deploys and manages a containerized [Simple Icons](https://simpleicons.org/) server, providing easy access to over 2,000 SVG and PNG icons for use in web projects, documentation, and branding.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
Ideal for developers and content creators, the role simplifies deploying a dedicated icon server. It automates container setup, configuration, and routing, ensuring reliable, quick access to icons. Easily integrate scalable icons into your projects without managing individual asset files.
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
|
||||||
|
The Docker-SimpleIcons role streamlines the deployment and management of a simple, efficient icon server. It helps you:
|
||||||
|
- Quickly deploy a lightweight, dedicated icon server.
|
||||||
|
- Serve icons consistently and reliably across multiple projects.
|
||||||
|
- Reduce manual maintenance of icon assets.
|
||||||
|
- Integrate seamlessly with complementary Ansible roles and web server configurations.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- **Icon Server:** Serves scalable SVG and PNG icons from the Simple Icons collection.
|
||||||
|
- **Containerized Deployment:** Utilizes Docker and Docker Compose for isolated, reliable deployment.
|
||||||
|
- **Dynamic Icon Delivery:** Icons are dynamically served via RESTful endpoints.
|
||||||
|
- **Customizable Setup:** Configure icon sizes, formats, and routes effortlessly.
|
||||||
|
- **Efficient Integration:** Works seamlessly with web server roles for robust domain routing.
|
||||||
|
- **Automated Maintenance:** Simplifies updates and re-deployments via automated container management.
|
||||||
|
|
||||||
|
## Credits 📝
|
||||||
|
|
||||||
|
Developed and maintained by **Kevin Veen-Birkenbach**.
|
||||||
|
Learn more at [www.veen.world](https://www.veen.world)
|
||||||
|
|
||||||
|
Part of the [CyMaIS Project](https://github.com/kevinveenbirkenbach/cymais)
|
||||||
|
License: [CyMaIS NonCommercial License (CNCL)](https://s.veen.world/cncl)
|
26
roles/docker-simpleicons/meta/main.yml
Normal file
26
roles/docker-simpleicons/meta/main.yml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
galaxy_info:
|
||||||
|
author: "Kevin Veen-Birkenbach"
|
||||||
|
description: "Deploy and serve SVG and PNG icons effortlessly with Simple Icons, a containerized icon server ideal for web projects, documentation, and branding."
|
||||||
|
license: "CyMaIS NonCommercial License (CNCL)"
|
||||||
|
license_url: "https://s.veen.world/cncl"
|
||||||
|
company: |
|
||||||
|
Kevin Veen-Birkenbach
|
||||||
|
Consulting & Coaching Solutions
|
||||||
|
https://www.veen.world
|
||||||
|
min_ansible_version: "2.9"
|
||||||
|
platforms:
|
||||||
|
- name: Docker
|
||||||
|
versions:
|
||||||
|
- latest
|
||||||
|
galaxy_tags:
|
||||||
|
- docker
|
||||||
|
- icons
|
||||||
|
- branding
|
||||||
|
- svg
|
||||||
|
- png
|
||||||
|
repository: "https://s.veen.world/cymais"
|
||||||
|
issue_tracker_url: "https://s.veen.world/cymaisissues"
|
||||||
|
documentation: "https://s.veen.world/cymais"
|
||||||
|
logo:
|
||||||
|
class: "fa-solid fa-icons"
|
||||||
|
run_after: []
|
30
roles/docker-simpleicons/tasks/main.yml
Normal file
30
roles/docker-simpleicons/tasks/main.yml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
- name: "include docker-compose role"
|
||||||
|
include_role:
|
||||||
|
name: docker-compose
|
||||||
|
when: run_once_docker_simpleicons is not defined
|
||||||
|
|
||||||
|
- name: "include role nginx-domain-setup for {{application_id}}"
|
||||||
|
include_role:
|
||||||
|
name: nginx-domain-setup
|
||||||
|
vars:
|
||||||
|
domain: "{{ domains | get_domain(application_id) }}"
|
||||||
|
http_port: "{{ ports.localhost.http[application_id] }}"
|
||||||
|
when: run_once_docker_simpleicons is not defined
|
||||||
|
|
||||||
|
- name: "Copy '{{ application_id }}' files"
|
||||||
|
template:
|
||||||
|
src: "{{ item.source }}"
|
||||||
|
dest: "{{ item.target }}"
|
||||||
|
mode: '0755'
|
||||||
|
loop:
|
||||||
|
- { source: "server.js.j2", target: "{{ simpleicons_host_server_file }}" }
|
||||||
|
- { source: "package.json.j2", target: "{{ simpleicons_host_package_file }}" }
|
||||||
|
notify:
|
||||||
|
- docker compose up
|
||||||
|
when: run_once_docker_simpleicons is not defined
|
||||||
|
|
||||||
|
- name: run the simpleicons tasks once
|
||||||
|
set_fact:
|
||||||
|
run_once_docker_portfolio: true
|
||||||
|
when: run_once_docker_simpleicons is not defined
|
@@ -1,7 +1,7 @@
|
|||||||
FROM node:latest AS builder
|
FROM node:latest AS builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package*.json ./
|
COPY ./config/package*.json ./
|
||||||
|
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
@@ -9,8 +9,8 @@ FROM node:latest
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=builder /app/node_modules ./node_modules
|
COPY --from=builder /app/node_modules ./node_modules
|
||||||
COPY server.js .
|
COPY ./config/server.js .
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE {{ container_port }}
|
||||||
|
|
||||||
CMD ["node", "server.js"]
|
CMD ["node", "server.js"]
|
@@ -1,4 +1,4 @@
|
|||||||
services:
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||||
application:
|
application:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
@@ -6,9 +6,9 @@ services:
|
|||||||
image: simpleicons-server:latest
|
image: simpleicons-server:latest
|
||||||
container_name: simpleicons-server
|
container_name: simpleicons-server
|
||||||
ports:
|
ports:
|
||||||
- "{{ports.localhost.http[application_id]}}:3000"
|
- "{{ports.localhost.http[application_id]}}:{{ container_port }}"
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||||
|
{% include 'roles/docker-container/templates/healthcheck/curl.yml.j2' %}
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
|
||||||
|
|
||||||
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user