mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-27 15:11:03 +01:00
Compare commits
No commits in common. "72ee7f2fce5efbc62d9a99d268765f433baa025a" and "67f54c2a16fa7c5118788c16407e0e628e28b204" have entirely different histories.
72ee7f2fce
...
67f54c2a16
@ -146,7 +146,6 @@ domains_wordpress: ["wordpress.{{top_domain}}","blog.{{top_domain}}
|
|||||||
postgres_default_version: "16"
|
postgres_default_version: "16"
|
||||||
|
|
||||||
### Docker Role Specific Parameters
|
### Docker Role Specific Parameters
|
||||||
docker_restart_policy: "unless-stopped"
|
|
||||||
|
|
||||||
#### Akaunting
|
#### Akaunting
|
||||||
version_akaunting: "latest"
|
version_akaunting: "latest"
|
||||||
@ -154,9 +153,6 @@ akaunting_company_name: "DUMMY_VALUE_NEEDS_TO_BE_CHANGED"
|
|||||||
akaunting_company_email: "DUMMY_VALUE_NEEDS_TO_BE_CHANGED"
|
akaunting_company_email: "DUMMY_VALUE_NEEDS_TO_BE_CHANGED"
|
||||||
akaunting_setup_admin_email: "DUMMY_VALUE_NEEDS_TO_BE_CHANGED"
|
akaunting_setup_admin_email: "DUMMY_VALUE_NEEDS_TO_BE_CHANGED"
|
||||||
|
|
||||||
#### Big Blue Button
|
|
||||||
bigbluebutton_enable_greenlight: "false"
|
|
||||||
|
|
||||||
#### Listmonk
|
#### Listmonk
|
||||||
listmonk_admin_username: "admin"
|
listmonk_admin_username: "admin"
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@ parser.add_argument('--maximum-backup-size-percent', type=int, dest='maximum_bac
|
|||||||
parser.add_argument('--backups-folder-path',type=str,dest='backups_folder_path',required=True, help="The folder in which the backups are stored")
|
parser.add_argument('--backups-folder-path',type=str,dest='backups_folder_path',required=True, help="The folder in which the backups are stored")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
def print_used_disc_space(backups_folder_path):
|
def print_used_disc_space():
|
||||||
print("%d %% of disk %s are used" % (psutil.disk_usage(backups_folder_path).percent,backups_folder_path))
|
print("%d %% of disk %s are used" % (psutil.disk_usage(args.backups_folder_path).percent,args.backups_folder_path))
|
||||||
|
|
||||||
def is_directory_used_by_another_process(directory_path):
|
def is_directory_used_by_another_process(directory_path):
|
||||||
command= "lsof " + directory_path
|
command= "lsof " + directory_path
|
||||||
@ -22,60 +22,8 @@ def is_directory_used_by_another_process(directory_path):
|
|||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def isSmallerThenMaximumBackupSize(maximum_backup_size_percent,backups_folder_path):
|
for host_backup_directory_name in os.listdir(args.backups_folder_path):
|
||||||
current_disc_usage_percent=psutil.disk_usage(backups_folder_path).percent
|
host_backup_directory_path = os.path.join(args.backups_folder_path, host_backup_directory_name)
|
||||||
return current_disc_usage_percent > maximum_backup_size_percent
|
|
||||||
|
|
||||||
def isDirectoryDeletable(version, versions, version_path):
|
|
||||||
print("Checking directory %s ..." % (version_path))
|
|
||||||
if version == versions[-1]:
|
|
||||||
print("Directory %s contains the last version of the backup. Skipped." % (version_path))
|
|
||||||
return False
|
|
||||||
|
|
||||||
if is_directory_used_by_another_process(version_path):
|
|
||||||
print("Directory %s is used by another process. Skipped." % (version_path))
|
|
||||||
return False
|
|
||||||
|
|
||||||
def deleteVersion(version_path, backups_folder_path):
|
|
||||||
print("Deleting %s to free space." % (version_path))
|
|
||||||
current_disc_usage_percent=psutil.disk_usage(backups_folder_path).percent
|
|
||||||
shutil.rmtree(version_path)
|
|
||||||
new_disc_usage_percent=psutil.disk_usage(backups_folder_path).percent
|
|
||||||
difference_percent=current_disc_usage_percent-new_disc_usage_percent
|
|
||||||
print("{:6.2f} %% of drive freed".format(difference_percent))
|
|
||||||
|
|
||||||
def count_total_application_directories(backups_folder_path):
|
|
||||||
total_app_directories = 0
|
|
||||||
for host_backup_directory_name in os.listdir(backups_folder_path):
|
|
||||||
host_backup_directory_path = os.path.join(backups_folder_path, host_backup_directory_name)
|
|
||||||
total_app_directories += sum(os.path.isdir(os.path.join(host_backup_directory_path, d)) for d in os.listdir(host_backup_directory_path))
|
|
||||||
return total_app_directories
|
|
||||||
|
|
||||||
def count_total_version_folders(backups_folder_path):
|
|
||||||
total_version_folders = 0
|
|
||||||
for host_backup_directory_name in os.listdir(backups_folder_path):
|
|
||||||
host_backup_directory_path = os.path.join(backups_folder_path, host_backup_directory_name)
|
|
||||||
for application_directory in os.listdir(host_backup_directory_path):
|
|
||||||
versions_directory = os.path.join(host_backup_directory_path, application_directory)
|
|
||||||
total_version_folders += sum(os.path.isdir(os.path.join(versions_directory, d)) for d in os.listdir(versions_directory))
|
|
||||||
return total_version_folders
|
|
||||||
|
|
||||||
def average_version_directories_per_application(backups_folder_path,blur=-1):
|
|
||||||
total_app_directories = count_total_application_directories(backups_folder_path)
|
|
||||||
total_version_folders = count_total_version_folders(backups_folder_path)
|
|
||||||
|
|
||||||
if total_app_directories == 0:
|
|
||||||
return 0
|
|
||||||
|
|
||||||
average = total_version_folders / total_app_directories
|
|
||||||
return int(average) - blur
|
|
||||||
|
|
||||||
def getAmountOfIteration(versions,average_version_directories_per_application):
|
|
||||||
return len(versions) - average_version_directories_per_application
|
|
||||||
|
|
||||||
def deleteIteration(backups_folder_path,average_version_directories_per_application):
|
|
||||||
for host_backup_directory_name in os.listdir(backups_folder_path):
|
|
||||||
host_backup_directory_path = os.path.join(backups_folder_path, host_backup_directory_name)
|
|
||||||
for application_directory in os.listdir(host_backup_directory_path):
|
for application_directory in os.listdir(host_backup_directory_path):
|
||||||
|
|
||||||
# The directory which contains all backup versions of the application
|
# The directory which contains all backup versions of the application
|
||||||
@ -83,28 +31,27 @@ def deleteIteration(backups_folder_path,average_version_directories_per_applicat
|
|||||||
|
|
||||||
versions = os.listdir(versions_directory)
|
versions = os.listdir(versions_directory)
|
||||||
versions.sort(reverse=False)
|
versions.sort(reverse=False)
|
||||||
version_iteration=0
|
|
||||||
while version_iteration < getAmountOfIteration(versions,average_version_directories_per_application):
|
print_used_disc_space()
|
||||||
print_used_disc_space(backups_folder_path)
|
for version in versions:
|
||||||
version = versions[version_iteration]
|
|
||||||
version_path=os.path.join(versions_directory, version)
|
version_path=os.path.join(versions_directory, version)
|
||||||
if isDirectoryDeletable(version, versions, version_path):
|
print("Checking directory %s ..." % (version_path))
|
||||||
deleteVersion(version_path, backups_folder_path)
|
if version == versions[-1]:
|
||||||
version_iteration += 1
|
print("Directory %s contains the last version of the backup. Skipped." % (version_path))
|
||||||
|
continue
|
||||||
|
|
||||||
backups_folder_path=args.backups_folder_path
|
if is_directory_used_by_another_process(version_path):
|
||||||
maximum_backup_size_percent=args.maximum_backup_size_percent
|
print("Directory %s is used by another process. Skipped." % (version_path))
|
||||||
|
continue
|
||||||
|
|
||||||
itteration_counter = 1
|
old_disc_usage_percent=psutil.disk_usage(args.backups_folder_path).percent
|
||||||
while isSmallerThenMaximumBackupSize(maximum_backup_size_percent, backups_folder_path):
|
if old_disc_usage_percent > args.maximum_backup_size_percent:
|
||||||
if itteration_counter > 200:
|
print("Deleting %s to free space." % (version_path))
|
||||||
raise Exception("Iteration limit exceeded")
|
shutil.rmtree(version_path)
|
||||||
|
new_disc_usage_percent=psutil.disk_usage(args.backups_folder_path).percent
|
||||||
|
difference_percent=old_disc_usage_percent-new_disc_usage_percent
|
||||||
|
print("{:6.2f} %% of drive freed".format(difference_percent))
|
||||||
|
continue
|
||||||
|
|
||||||
print(f"Delete Iteration: {itteration_counter}")
|
print_used_disc_space()
|
||||||
average_version_directories = average_version_directories_per_application(backups_folder_path)
|
|
||||||
print(f"Average version directories per application directory: {average_version_directories}")
|
|
||||||
deleteIteration(backups_folder_path, average_version_directories)
|
|
||||||
itteration_counter += 1
|
|
||||||
|
|
||||||
print_used_disc_space(backups_folder_path)
|
|
||||||
print("Cleaning up finished.")
|
print("Cleaning up finished.")
|
@ -12,7 +12,7 @@ services:
|
|||||||
- 127.0.0.1:{{http_port}}:80
|
- 127.0.0.1:{{http_port}}:80
|
||||||
volumes:
|
volumes:
|
||||||
- data:/var/www/html
|
- data:/var/www/html
|
||||||
restart: {{docker_restart_policy}}
|
restart: unless-stopped
|
||||||
env_file:
|
env_file:
|
||||||
- env/run.env
|
- env/run.env
|
||||||
environment:
|
environment:
|
||||||
|
@ -9,7 +9,7 @@ services:
|
|||||||
application:
|
application:
|
||||||
image: baserow/baserow:1.19.1
|
image: baserow/baserow:1.19.1
|
||||||
container_name: baserow-application
|
container_name: baserow-application
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
env_file:
|
env_file:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
ENABLE_COTURN=true
|
ENABLE_COTURN=true
|
||||||
COTURN_TLS_CERT_PATH=/etc/letsencrypt/live/{{domain}}/fullchain.pem
|
COTURN_TLS_CERT_PATH=/etc/letsencrypt/live/{{domain}}/fullchain.pem
|
||||||
COTURN_TLS_KEY_PATH=/etc/letsencrypt/live/{{domain}}/privkey.pem
|
COTURN_TLS_KEY_PATH=/etc/letsencrypt/live/{{domain}}/privkey.pem
|
||||||
ENABLE_GREENLIGHT={{bigbluebutton_enable_greenlight}}
|
ENABLE_GREENLIGHT=true
|
||||||
|
|
||||||
# Enable Webhooks
|
# Enable Webhooks
|
||||||
# used by some integrations
|
# used by some integrations
|
||||||
|
@ -5,7 +5,7 @@ services:
|
|||||||
{% include 'templates/docker-service-redis.yml.j2' %}
|
{% include 'templates/docker-service-redis.yml.j2' %}
|
||||||
|
|
||||||
celeryworker:
|
celeryworker:
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
|
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
|
||||||
env_file: .env
|
env_file: .env
|
||||||
command: celery -A funkwhale_api.taskapp worker -l INFO --concurrency=${CELERYD_CONCURRENCY-0}
|
command: celery -A funkwhale_api.taskapp worker -l INFO --concurrency=${CELERYD_CONCURRENCY-0}
|
||||||
@ -18,7 +18,7 @@ services:
|
|||||||
|
|
||||||
|
|
||||||
celerybeat:
|
celerybeat:
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
|
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
|
||||||
env_file: .env
|
env_file: .env
|
||||||
command: celery -A funkwhale_api.taskapp beat --pidfile= -l INFO
|
command: celery -A funkwhale_api.taskapp beat --pidfile= -l INFO
|
||||||
@ -26,7 +26,7 @@ services:
|
|||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
{% include 'templates/docker-container-networks.yml.j2' %}
|
||||||
|
|
||||||
api:
|
api:
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
|
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
|
||||||
depends_on:
|
depends_on:
|
||||||
env_file: .env
|
env_file: .env
|
||||||
@ -39,7 +39,7 @@ services:
|
|||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
{% include 'templates/docker-container-networks.yml.j2' %}
|
||||||
|
|
||||||
front:
|
front:
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
image: funkwhale/front:${FUNKWHALE_VERSION:-latest}
|
image: funkwhale/front:${FUNKWHALE_VERSION:-latest}
|
||||||
depends_on:
|
depends_on:
|
||||||
- api
|
- api
|
||||||
|
@ -7,7 +7,7 @@ services:
|
|||||||
application:
|
application:
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
image: gitea/gitea:latest
|
image: gitea/gitea:latest
|
||||||
environment:
|
environment:
|
||||||
- USER_UID=1000
|
- USER_UID=1000
|
||||||
|
@ -7,7 +7,7 @@ services:
|
|||||||
|
|
||||||
web:
|
web:
|
||||||
image: 'gitlab/gitlab-ee:latest'
|
image: 'gitlab/gitlab-ee:latest'
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
hostname: '{{domain}}'
|
hostname: '{{domain}}'
|
||||||
environment:
|
environment:
|
||||||
GITLAB_OMNIBUS_CONFIG: |
|
GITLAB_OMNIBUS_CONFIG: |
|
||||||
|
@ -7,9 +7,10 @@
|
|||||||
definition:
|
definition:
|
||||||
application:
|
application:
|
||||||
image: jenkins/jenkins:lts
|
image: jenkins/jenkins:lts
|
||||||
restart: "{{docker_restart_policy}}"
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{http_port}}:8080"
|
- "127.0.0.1:{{http_port}}:8080"
|
||||||
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- jenkins_data:/var/jenkins_home
|
- jenkins_data:/var/jenkins_home
|
||||||
log_driver: journald
|
log_driver: journald
|
||||||
|
@ -13,7 +13,7 @@ services:
|
|||||||
JOOMLA_DB_USER: "{{database_username}}"
|
JOOMLA_DB_USER: "{{database_username}}"
|
||||||
JOOMLA_DB_PASSWORD: "{{database_password}}"
|
JOOMLA_DB_PASSWORD: "{{database_password}}"
|
||||||
JOOMLA_DB_NAME: "{{database_name}}"
|
JOOMLA_DB_NAME: "{{database_name}}"
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- data:/var/www/html
|
- data:/var/www/html
|
||||||
ports:
|
ports:
|
||||||
|
@ -5,7 +5,7 @@ services:
|
|||||||
{% include 'templates/docker-service-' + database_type + '.yml.j2' %}
|
{% include 'templates/docker-service-' + database_type + '.yml.j2' %}
|
||||||
|
|
||||||
application:
|
application:
|
||||||
restart: {{docker_restart_policy}}
|
restart: unless-stopped
|
||||||
image: listmonk/listmonk:latest
|
image: listmonk/listmonk:latest
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{http_port}}:9000"
|
- "127.0.0.1:{{http_port}}:9000"
|
||||||
|
@ -10,7 +10,7 @@ services:
|
|||||||
resolver:
|
resolver:
|
||||||
image: ghcr.io/mailu/unbound:{{version_mailu}}
|
image: ghcr.io/mailu/unbound:{{version_mailu}}
|
||||||
env_file: mailu.env
|
env_file: mailu.env
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
{% include 'templates/docker-container-networks.yml.j2' %}
|
||||||
ipv4_address: 192.168.203.254
|
ipv4_address: 192.168.203.254
|
||||||
logging:
|
logging:
|
||||||
@ -18,7 +18,7 @@ services:
|
|||||||
|
|
||||||
front:
|
front:
|
||||||
image: ghcr.io/mailu/nginx:{{version_mailu}}
|
image: ghcr.io/mailu/nginx:{{version_mailu}}
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
env_file: mailu.env
|
env_file: mailu.env
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
@ -45,7 +45,7 @@ services:
|
|||||||
|
|
||||||
admin:
|
admin:
|
||||||
image: ghcr.io/mailu/admin:{{version_mailu}}
|
image: ghcr.io/mailu/admin:{{version_mailu}}
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
env_file: mailu.env
|
env_file: mailu.env
|
||||||
volumes:
|
volumes:
|
||||||
- "admin_data:/data"
|
- "admin_data:/data"
|
||||||
@ -63,7 +63,7 @@ services:
|
|||||||
|
|
||||||
imap:
|
imap:
|
||||||
image: ghcr.io/mailu/dovecot:{{version_mailu}}
|
image: ghcr.io/mailu/dovecot:{{version_mailu}}
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
env_file: mailu.env
|
env_file: mailu.env
|
||||||
volumes:
|
volumes:
|
||||||
- "dovecot_mail:/mail"
|
- "dovecot_mail:/mail"
|
||||||
@ -79,7 +79,7 @@ services:
|
|||||||
|
|
||||||
smtp:
|
smtp:
|
||||||
image: ghcr.io/mailu/postfix:{{version_mailu}}
|
image: ghcr.io/mailu/postfix:{{version_mailu}}
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
env_file: mailu.env
|
env_file: mailu.env
|
||||||
volumes:
|
volumes:
|
||||||
- "/etc/mailu/overrides:/overrides:ro"
|
- "/etc/mailu/overrides:/overrides:ro"
|
||||||
@ -96,7 +96,7 @@ services:
|
|||||||
oletools:
|
oletools:
|
||||||
image: ghcr.io/mailu/oletools:{{version_mailu}}
|
image: ghcr.io/mailu/oletools:{{version_mailu}}
|
||||||
hostname: oletools
|
hostname: oletools
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- resolver
|
- resolver
|
||||||
dns:
|
dns:
|
||||||
@ -106,7 +106,7 @@ services:
|
|||||||
|
|
||||||
antispam:
|
antispam:
|
||||||
image: ghcr.io/mailu/rspamd:{{version_mailu}}
|
image: ghcr.io/mailu/rspamd:{{version_mailu}}
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
env_file: mailu.env
|
env_file: mailu.env
|
||||||
volumes:
|
volumes:
|
||||||
- "filter:/var/lib/rspamd"
|
- "filter:/var/lib/rspamd"
|
||||||
@ -128,7 +128,7 @@ services:
|
|||||||
# Optional services
|
# Optional services
|
||||||
antivirus:
|
antivirus:
|
||||||
image: ghcr.io/mailu/clamav:{{version_mailu}}
|
image: ghcr.io/mailu/clamav:{{version_mailu}}
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
env_file: mailu.env
|
env_file: mailu.env
|
||||||
volumes:
|
volumes:
|
||||||
- "filter:/data"
|
- "filter:/data"
|
||||||
@ -142,7 +142,7 @@ services:
|
|||||||
|
|
||||||
webdav:
|
webdav:
|
||||||
image: ghcr.io/mailu/radicale:{{version_mailu}}
|
image: ghcr.io/mailu/radicale:{{version_mailu}}
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
env_file: mailu.env
|
env_file: mailu.env
|
||||||
volumes:
|
volumes:
|
||||||
- "webdav_data:/data"
|
- "webdav_data:/data"
|
||||||
@ -159,7 +159,7 @@ services:
|
|||||||
image: ghcr.io/mailu/fetchmail:{{version_mailu}}
|
image: ghcr.io/mailu/fetchmail:{{version_mailu}}
|
||||||
volumes:
|
volumes:
|
||||||
- "admin_data:/data"
|
- "admin_data:/data"
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
env_file: mailu.env
|
env_file: mailu.env
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
@ -174,7 +174,7 @@ services:
|
|||||||
|
|
||||||
webmail:
|
webmail:
|
||||||
image: ghcr.io/mailu/webmail:{{version_mailu}}
|
image: ghcr.io/mailu/webmail:{{version_mailu}}
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
env_file: mailu.env
|
env_file: mailu.env
|
||||||
volumes:
|
volumes:
|
||||||
- "webmail_data:/data"
|
- "webmail_data:/data"
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
published_ports:
|
published_ports:
|
||||||
- "127.0.0.1:3306:3306" # can be that this will be removed if all applications use sockets
|
- "127.0.0.1:3306:3306" # can be that this will be removed if all applications use sockets
|
||||||
command: "--transaction-isolation=READ-COMMITTED --binlog-format=ROW" #for nextcloud
|
command: "--transaction-isolation=READ-COMMITTED --binlog-format=ROW" #for nextcloud
|
||||||
restart_policy: "{{docker_restart_policy}}"
|
restart_policy: unless-stopped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: "/usr/bin/mariadb --user=root --password={{central_mariadb_root_password}} --execute \"SHOW DATABASES;\""
|
test: "/usr/bin/mariadb --user=root --password={{central_mariadb_root_password}} --execute \"SHOW DATABASES;\""
|
||||||
interval: 3s
|
interval: 3s
|
||||||
|
@ -7,7 +7,7 @@ services:
|
|||||||
|
|
||||||
web:
|
web:
|
||||||
image: ghcr.io/mastodon/mastodon:{{version_mastodon}}
|
image: ghcr.io/mastodon/mastodon:{{version_mastodon}}
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
env_file: .env.production
|
env_file: .env.production
|
||||||
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 3000"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@ -23,7 +23,7 @@ services:
|
|||||||
|
|
||||||
streaming:
|
streaming:
|
||||||
image: ghcr.io/mastodon/mastodon:{{version_mastodon}}
|
image: ghcr.io/mastodon/mastodon:{{version_mastodon}}
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
env_file: .env.production
|
env_file: .env.production
|
||||||
command: node ./streaming
|
command: node ./streaming
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@ -37,7 +37,7 @@ services:
|
|||||||
|
|
||||||
sidekiq:
|
sidekiq:
|
||||||
image: ghcr.io/mastodon/mastodon:{{version_mastodon}}
|
image: ghcr.io/mastodon/mastodon:{{version_mastodon}}
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
env_file: .env.production
|
env_file: .env.production
|
||||||
command: bundle exec sidekiq
|
command: bundle exec sidekiq
|
||||||
{% include 'templates/docker-container-depends-on-database-redis.yml.j2' %}
|
{% include 'templates/docker-container-depends-on-database-redis.yml.j2' %}
|
||||||
|
@ -8,7 +8,7 @@ services:
|
|||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
image: matomo
|
image: matomo
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{http_port}}:80"
|
- "127.0.0.1:{{http_port}}:80"
|
||||||
environment:
|
environment:
|
||||||
|
@ -6,7 +6,7 @@ services:
|
|||||||
|
|
||||||
synapse:
|
synapse:
|
||||||
image: matrixdotorg/synapse:latest
|
image: matrixdotorg/synapse:latest
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
volumes:
|
volumes:
|
||||||
@ -23,7 +23,7 @@ services:
|
|||||||
|
|
||||||
element:
|
element:
|
||||||
image: vectorim/element-web:latest
|
image: vectorim/element-web:latest
|
||||||
restart: {{docker_restart_policy}}
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- ./element-config.json:/app/config.json
|
- ./element-config.json:/app/config.json
|
||||||
ports:
|
ports:
|
||||||
@ -34,28 +34,28 @@ services:
|
|||||||
#mautrix-telegram:
|
#mautrix-telegram:
|
||||||
# container_name: mautrix-telegram
|
# container_name: mautrix-telegram
|
||||||
# image: dock.mau.dev/mautrix/telegram:<version>
|
# image: dock.mau.dev/mautrix/telegram:<version>
|
||||||
# restart: {{docker_restart_policy}}
|
# restart: unless-stopped
|
||||||
# volumes:
|
# volumes:
|
||||||
# - telegram_bridge_data:/data
|
# - telegram_bridge_data:/data
|
||||||
|
|
||||||
#mautrix-whatsapp:
|
#mautrix-whatsapp:
|
||||||
# container_name: mautrix-whatsapp
|
# container_name: mautrix-whatsapp
|
||||||
# image: dock.mau.dev/mautrix/whatsapp:latest
|
# image: dock.mau.dev/mautrix/whatsapp:latest
|
||||||
# restart: {{docker_restart_policy}}
|
# restart: unless-stopped
|
||||||
# volumes:
|
# volumes:
|
||||||
# - ./mautrix_whatsapp:/data
|
# - ./mautrix_whatsapp:/data
|
||||||
|
|
||||||
#mautrix-facebook:
|
#mautrix-facebook:
|
||||||
# container_name: mautrix-facebook
|
# container_name: mautrix-facebook
|
||||||
# image: dock.mau.dev/mautrix/facebook:<version>
|
# image: dock.mau.dev/mautrix/facebook:<version>
|
||||||
# restart: {{docker_restart_policy}}
|
# restart: unless-stopped
|
||||||
# volumes:
|
# volumes:
|
||||||
# - facebook_bridge_data:/data
|
# - facebook_bridge_data:/data
|
||||||
|
|
||||||
#mautrix-instagram:
|
#mautrix-instagram:
|
||||||
# container_name: mautrix-instagram
|
# container_name: mautrix-instagram
|
||||||
# image: dock.mau.dev/mautrix/instagram:<version>
|
# image: dock.mau.dev/mautrix/instagram:<version>
|
||||||
# restart: {{docker_restart_policy}}
|
# restart: unless-stopped
|
||||||
# volumes:
|
# volumes:
|
||||||
# - instagram_bridge_data:/data
|
# - instagram_bridge_data:/data
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
application:
|
application:
|
||||||
log_driver: journald
|
log_driver: journald
|
||||||
image: mediawiki
|
image: mediawiki
|
||||||
restart: "{{docker_restart_policy}}"
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- database
|
- database
|
||||||
volumes:
|
volumes:
|
||||||
@ -26,4 +26,4 @@
|
|||||||
MARIADB_AUTO_UPGRADE: "1"
|
MARIADB_AUTO_UPGRADE: "1"
|
||||||
volumes:
|
volumes:
|
||||||
- database:/var/lib/mysql
|
- database:/var/lib/mysql
|
||||||
restart: "{{docker_restart_policy}}"
|
restart: always
|
||||||
|
@ -9,7 +9,7 @@ services:
|
|||||||
options:
|
options:
|
||||||
tag: "mybb_application"
|
tag: "mybb_application"
|
||||||
image: mybb/mybb:latest
|
image: mybb/mybb:latest
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- data:/var/www/html
|
- data:/var/www/html
|
||||||
{% include 'templates/docker-container-depends-on-just-database.yml.j2' %}
|
{% include 'templates/docker-container-depends-on-just-database.yml.j2' %}
|
||||||
@ -21,7 +21,7 @@ services:
|
|||||||
options:
|
options:
|
||||||
tag: "mybb_server"
|
tag: "mybb_server"
|
||||||
image: nginx:mainline
|
image: nginx:mainline
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{http_port}}:80"
|
- "127.0.0.1:{{http_port}}:80"
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -8,7 +8,7 @@ services:
|
|||||||
|
|
||||||
application:
|
application:
|
||||||
image: "nextcloud:{{version_nextcloud}}-fpm-alpine"
|
image: "nextcloud:{{version_nextcloud}}-fpm-alpine"
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
volumes:
|
volumes:
|
||||||
@ -25,7 +25,7 @@ services:
|
|||||||
image: nginx:alpine
|
image: nginx:alpine
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{http_port}}:80"
|
- "127.0.0.1:{{http_port}}:80"
|
||||||
volumes:
|
volumes:
|
||||||
@ -41,7 +41,7 @@ services:
|
|||||||
|
|
||||||
cron:
|
cron:
|
||||||
image: "nextcloud:{{version_nextcloud}}-fpm-alpine"
|
image: "nextcloud:{{version_nextcloud}}-fpm-alpine"
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
version: "3.7"
|
version: "3.7"
|
||||||
|
|
||||||
x-op-app: &app
|
x-op-app: &app
|
||||||
restart: {{docker_restart_policy}}
|
restart: unless-stopped
|
||||||
image: openproject/community:${TAG:-13}
|
image: openproject/community:${TAG:-13}
|
||||||
environment:
|
environment:
|
||||||
OPENPROJECT_HTTPS: "${OPENPROJECT_HTTPS}"
|
OPENPROJECT_HTTPS: "${OPENPROJECT_HTTPS}"
|
||||||
@ -25,11 +25,11 @@ services:
|
|||||||
|
|
||||||
cache:
|
cache:
|
||||||
image: memcached
|
image: memcached
|
||||||
restart: {{docker_restart_policy}}
|
restart: unless-stopped
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
{% include 'templates/docker-container-networks.yml.j2' %}
|
||||||
|
|
||||||
proxy:
|
proxy:
|
||||||
restart: {{docker_restart_policy}}
|
restart: unless-stopped
|
||||||
image: openproject/community:${TAG:-13}
|
image: openproject/community:${TAG:-13}
|
||||||
command: "./docker/prod/proxy"
|
command: "./docker/prod/proxy"
|
||||||
ports:
|
ports:
|
||||||
|
@ -8,7 +8,7 @@ services:
|
|||||||
|
|
||||||
application:
|
application:
|
||||||
image: zknt/pixelfed
|
image: zknt/pixelfed
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
env_file:
|
env_file:
|
||||||
@ -23,7 +23,7 @@ services:
|
|||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
{% include 'templates/docker-container-networks.yml.j2' %}
|
||||||
worker:
|
worker:
|
||||||
image: zknt/pixelfed
|
image: zknt/pixelfed
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
env_file:
|
env_file:
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
- "127.0.0.1:5432:5432"
|
- "127.0.0.1:5432:5432"
|
||||||
volumes:
|
volumes:
|
||||||
- central_postgres_database:/var/lib/postgresql/data
|
- central_postgres_database:/var/lib/postgresql/data
|
||||||
restart_policy: "{{docker_restart_policy}}"
|
restart_policy: unless-stopped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
|
@ -6,4 +6,4 @@ services:
|
|||||||
context: .
|
context: .
|
||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:{{http_port}}:8080
|
- 127.0.0.1:{{http_port}}:8080
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
@ -10,7 +10,7 @@ services:
|
|||||||
image: custom_wordpress
|
image: custom_wordpress
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{http_port}}:80"
|
- "127.0.0.1:{{http_port}}:80"
|
||||||
environment:
|
environment:
|
||||||
|
@ -8,7 +8,7 @@ services:
|
|||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
image: yourls
|
image: yourls
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{http_port}}:80"
|
- "127.0.0.1:{{http_port}}:80"
|
||||||
environment:
|
environment:
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
template:
|
template:
|
||||||
src: "msmtprc.conf.j2"
|
src: "msmtprc.conf.j2"
|
||||||
dest: "/root/.msmtprc"
|
dest: "/root/.msmtprc"
|
||||||
mode: 600
|
|
||||||
when: run_once_systemd_notifier_email is not defined
|
when: run_once_systemd_notifier_email is not defined
|
||||||
|
|
||||||
- name: "create {{systemd_notifier_email_folder}}"
|
- name: "create {{systemd_notifier_email_folder}}"
|
||||||
|
@ -7,9 +7,5 @@ Subject: $1
|
|||||||
Content-Transfer-Encoding: 8bit
|
Content-Transfer-Encoding: 8bit
|
||||||
Content-Type: text/plain; charset=UTF-8
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
|
||||||
A problem with the service $1 occured:
|
$(systemctl status --full "$1")
|
||||||
|
|
||||||
$(systemctl status --full "$1" | head -n 30)
|
|
||||||
|
|
||||||
|
|
||||||
ERRMAIL
|
ERRMAIL
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
image: mariadb
|
image: mariadb
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
MYSQL_DATABASE: "{{database_name}}"
|
MYSQL_DATABASE: "{{database_name}}"
|
||||||
MYSQL_USER: "{{database_username}}"
|
MYSQL_USER: "{{database_username}}"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
- POSTGRES_USER={{database_username}}
|
- POSTGRES_USER={{database_username}}
|
||||||
- POSTGRES_DB={{database_name}}
|
- POSTGRES_DB={{database_name}}
|
||||||
- POSTGRES_INITDB_ARGS=--encoding=UTF8 --locale=C
|
- POSTGRES_INITDB_ARGS=--encoding=UTF8 --locale=C
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -U {{database_name}}"]
|
test: ["CMD-SHELL", "pg_isready -U {{database_name}}"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
redis:
|
redis:
|
||||||
image: redis:alpine
|
image: redis:alpine
|
||||||
container_name: {{docker_compose_project_name}}-redis
|
container_name: {{docker_compose_project_name}}-redis
|
||||||
restart: {{docker_restart_policy}}
|
restart: always
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
volumes:
|
volumes:
|
||||||
|
Loading…
Reference in New Issue
Block a user